24#include <svx/strings.hrc>
53 ImpRemap3DDepth(sal_uInt32 nOrdNum,
double fMinimalDepth);
54 explicit ImpRemap3DDepth(sal_uInt32 nOrdNum);
57 bool operator<(
const ImpRemap3DDepth& rComp)
const;
59 sal_uInt32 GetOrdNum()
const {
return mnOrdNum; }
60 bool IsScene()
const {
return mbIsScene; }
65ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum,
double fMinimalDepth)
72ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum)
114 for(
size_t a = 0;
a < nObjCount; ++
a)
124 ImpRemap3DDepth aEntry(
a, fMinimalDepth);
130 ImpRemap3DDepth aEntry(
a);
156 return std::make_unique<sdr::properties::E3dSceneProperties>(*
this);
164 return std::make_unique<sdr::contact::ViewContactOfE3dScene>(*
this);
171 bDrawOnlySelected(false),
172 mbSkipSettingDirty(false)
181 bDrawOnlySelected(false),
182 mbSkipSettingDirty(false)
212 _control87( _MCW_EM, _MCW_EM );
227 if(fabs(fNew - aActualPosition.
getZ()) > 1.0)
248 return const_cast< E3dScene*
>(
this);
253 return const_cast< E3dScene*
>(
this);
328 aNewSnapRect.
Move(rSize);
336 ResizeRect(aNewSnapRect, rRef, rXFact, rYFact);
391 if(
nullptr != pParent)
396 return const_cast< E3dScene*
>(
this);
409 bool bRemoveObject(
false);
414 pScene->removeAllNonSelectedObjects();
417 const size_t nObjCount(pScene->GetSubList() ? pScene->GetSubList()->GetObjCount() : 0);
422 bRemoveObject =
true;
427 if(!pCompound->GetSelected())
429 bRemoveObject =
true;
444 return new E3dScene(rTargetModel, *
this);
451 if(
nullptr != pScene)
461 if(
nullptr != pScene)
471 if(
nullptr != pScene)
486 while(a3DIterator.
IsMore())
497 return std::make_unique<E3DSceneGeoData>();
538 if (sn==1.0 && cs==0.0) {
541 }
else if (sn==0.0 && cs==-1.0) {
544 }
else if (sn==-1.0 && cs==0.0) {
570 if (!
aName.isEmpty())
577 return SvxResId(STR_ObjNamePluralScene3d);
619 aRotation.
rotate(0.0, 0.0, fAngleInRad);
664 while ( a3DIterator.
IsMore() )
830 if(pOldPage == pNewPage)
846 OSL_ENSURE(
false,
"E3dScene::handlePageChange invalid object list (!)");
853 return const_cast< E3dScene*
>(
this);
861 for(
size_t a = 0;
a < nObjCnt; ++
a)
869 aRetval.
expand(aLocalRange);
void SetViewportValues(const basegfx::B3DPoint &rNewVRP, const basegfx::B3DVector &rNewVPN, const basegfx::B3DVector &rNewVUV)
void SetPosition(const basegfx::B3DPoint &rNewPos)
void SetFocalLength(double fLen)
const basegfx::B3DPoint & GetPosition() const
void SetViewWindow(double fX, double fY, double fW, double fH)
Helper for 3d object changes affecting 2d geometry.
void InvalidateBoundVolume()
virtual void StructureChanged()
basegfx::B3DPolyPolygon CreateWireframe() const
virtual void SetTransformChanged()
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix)
const basegfx::B3DRange & GetBoundVolume() const
const basegfx::B3DHomMatrix & GetTransform() const
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix)
basegfx::B3DHomMatrix maTransformation
E3dScene * getParentE3dSceneFromE3dObject() const
virtual void SetSelected(bool bNew)
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
virtual bool IsBreakObjPossible()
virtual void NbcResize(const Point &rRef, const Fraction &rXFact, const Fraction &rYFact) override
void SetAllSceneRectsDirty()
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
virtual OUString TakeObjNamePlural() const override
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const
virtual SdrObject * getSdrObjectFromSdrObjList() const override
virtual E3dScene * getRootE3dSceneFromE3dObject() const override
B3dCamera & GetCameraSet()
virtual SdrObjList * getChildrenOfSdrObject() const override
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage) override
void ResumeReportingDirtyRects()
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Detects when a stylesheet is changed.
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
virtual rtl::Reference< SdrObject > NbcRemoveObject(size_t nObjNum) override
remove from list without delete
void ImpCleanup3DDepthMapper()
virtual std::unique_ptr< SdrObjGeoData > NewGeoData() const override
A derived class must override these 3 methods if it has own geometric data that must be saved for Und...
virtual void SetTransformChanged() override
virtual bool BckCreate(SdrDragStat &rStat) override
virtual void StructureChanged() override
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix) override
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
virtual bool IsBreakObjPossible() override
E3dScene(SdrModel &rSdrModel)
void SetDefaultAttributes()
virtual bool MovCreate(SdrDragStat &rStat) override
virtual void SetSelected(bool bNew) override
double GetFocalLength() const
virtual void NbcMove(const Size &rSize) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE) override
virtual ~E3dScene() override
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
void removeAllNonSelectedObjects()
virtual void NbcSetLayer(SdrLayerID nLayer) override
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum) override
void RotateScene(const Point &rRef, double sn, double cs)
virtual void SetBoundRectDirty() override
virtual SdrObjKind GetObjIdentifier() const override
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix) override
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
ProjectionType GetPerspective() const
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
virtual SdrPage * getSdrPageFromSdrObjList() const override
double GetDistance() const
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE) override
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true) override
virtual OUString TakeObjNameSingul() const override
virtual void BrkCreate(SdrDragStat &rStat) override
std::unique_ptr< Imp3DDepthRemapper > mp3DDepthRemapper
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
virtual SdrObjList * GetSubList() const override
void SetCamera(const Camera3D &rNewCamera)
virtual basegfx::B3DRange RecalcBoundVolume() const override
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
void SuspendReportingDirtyRects()
std::vector< ImpRemap3DDepth > maVector
sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const
Imp3DDepthRemapper(E3dScene const &rScene)
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
virtual const tools::Rectangle & GetSnapRect() const override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Detects when a stylesheet is changed.
tools::Rectangle maSnapRect
void SetActionRect(const tools::Rectangle &rR)
sal_Int32 GetPointCount() const
void TakeCreateRect(tools::Rectangle &rRect) const
void SetOrtho4Possible(bool bOn=true)
const Point & GetStart() const
const Point & GetNow() const
All geometrical data of an arbitrary object for use in undo/redo.
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void CopyObjects(const SdrObjList &rSrcList)
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual rtl::Reference< SdrObject > NbcRemoveObject(size_t nObjNum)
remove from list without delete
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
virtual void NbcSetLayer(SdrLayerID nLayer)
const tools::Rectangle & getOutRectangle() const
virtual sdr::properties::BaseProperties & GetProperties() const
sal_uInt32 GetOrdNum() const
The order number (aka ZOrder, aka z-index) determines whether a SdrObject is located above or below a...
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
virtual const OUString & GetName() const
sdr::contact::ViewContact & GetViewContact() const
SdrPage * getSdrPageFromSdrObject() const
virtual SdrLayerID GetLayer() const
void NbcRotateGluePoints(const Point &rRef, Degree100 nAngle, double sn, double cs)
void SetGlueReallyAbsolute(bool bOn)
virtual void SetBoundRectDirty()
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
void SetProjection(ProjectionType ePrj)
void SetDeviceWindow(const tools::Rectangle &rRect)
ProjectionType GetProjection() const
const basegfx::B3DVector & GetVUV() const
const basegfx::B3DPoint & GetVRP() const
const tools::Rectangle & GetDeviceWindow() const
const basegfx::B3DPoint & GetViewPoint()
void transform(const basegfx::B2DHomMatrix &rMatrix)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
BASEGFX_DLLPUBLIC void transform(const B3DHomMatrix &rMatrix)
void expand(const B3DTuple &rTuple)
OUString SvxResId(TranslateId aId)
double getMinimalDepthInViewCoordinates(const E3dCompoundObject &rObject)
support extracting the minimal depth of a 3d object in its scene
B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat)
E3dObject * DynCastE3dObject(SdrObject *pObj)
E3dScene * DynCastE3dScene(SdrObject *pObj)
void ResizeRect(tools::Rectangle &rRect, const Point &rRef, const Fraction &rxFact, const Fraction &ryFact)
bool operator<(const Subset &rLHS, const Subset &rRHS)