22#include <svx/strings.hrc>
39#include <com/sun/star/uno/Sequence.h>
48 return std::make_unique<sdr::properties::E3dProperties>(*
this);
147 if(
nullptr == pScene)
155 basegfx::B2DPoint aScaleCenter2D(
static_cast<double>(rRef.
X()),
static_cast<double>(rRef.
Y()));
158 aInverseSceneTransform.
invert();
159 aScaleCenter2D = aInverseSceneTransform * aScaleCenter2D;
164 aInverseViewToEye.
invert();
165 aScaleCenter3D = aInverseViewToEye * aScaleCenter3D;
168 double fScaleX(xFact);
169 double fScaleY(yFact);
173 aInverseOrientation.
invert();
179 aTrans.
scale(fScaleX, fScaleY, 1.0);
181 aTrans *= aInverseOrientation;
183 aTrans *= aFullTransform;
199 if(
nullptr == pScene)
209 if(
nullptr != pParent)
212 aInvDispTransform.
invert();
233 aInverseOrientation.
invert();
236 aMove = aCompleteTrans * aMove;
237 aPos = aCompleteTrans * aPos;
258 if(
nullptr != pParent)
275 if(
nullptr != pParent)
297 if(!xLocalSequence.empty())
299 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
302 aRetval = xLocalSequence.
getB3DRange(aLocalViewInformation3D);
341 if(
nullptr != pParent)
343 aNewFullTransformation = pParent->
GetFullTransform() * aNewFullTransformation;
387 if (!
aName.isEmpty())
397 return SvxResId(STR_ObjNamePluralObj3d);
402 return new E3dObject(rTargetModel, *
this);
407 return std::make_unique<E3DObjGeoData>();
439 aRotateZ.
rotate(0.0, 0.0, fAngleInRad);
451 return std::make_unique<sdr::properties::E3dCompoundProperties>(*
this);
471 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
495 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
507 for(sal_uInt32
a(0);
a < 8;
a++)
539 if(aPolyPolygon.
count())
541 rHdlList.
AddHdl(std::make_unique<E3dVolumeMarker>(aPolyPolygon));
555 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
572 if(xLocalSequence.empty())
592 sal_Int32(floor(aSnapRange.
getMinX())), sal_Int32(floor(aSnapRange.
getMinY())),
593 sal_Int32(ceil(aSnapRange.
getMaxX())), sal_Int32(ceil(aSnapRange.
getMaxY())));
604 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
Helper for 3d object changes affecting 2d geometry.
virtual SdrObjKind GetObjIdentifier() const override
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
E3dCompoundObject(SdrModel &rSdrModel, E3dCompoundObject const &rSource)
virtual ~E3dCompoundObject() override
basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon &rCandidate) const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
void InvalidateBoundVolume()
virtual void StructureChanged()
basegfx::B3DPolyPolygon CreateWireframe() const
virtual void SetTransformChanged()
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix)
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
const basegfx::B3DRange & GetBoundVolume() const
virtual basegfx::B3DRange RecalcBoundVolume() const
const basegfx::B3DHomMatrix & GetTransform() const
virtual void NbcMove(const Size &rSize) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix)
virtual E3dScene * getRootE3dSceneFromE3dObject() const
basegfx::B3DHomMatrix maTransformation
basegfx::B3DRange maLocalBoundVol
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
E3dObject(SdrModel &rSdrModel)
const basegfx::B3DHomMatrix & GetFullTransform() const
E3dScene * getParentE3dSceneFromE3dObject() const
virtual void SetSelected(bool bNew)
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
virtual ~E3dObject() override
virtual OUString TakeObjNamePlural() const override
virtual rtl::Reference< SdrAttrObj > GetBreakObj()
virtual SdrObjKind GetObjIdentifier() const override
virtual OUString TakeObjNameSingul() const override
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 std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
basegfx::B3DHomMatrix maFullTransform
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
virtual SdrInventor GetObjInventor() const override
virtual bool IsBreakObjPossible()
virtual E3dScene * getRootE3dSceneFromE3dObject() const override
virtual void StructureChanged() override
constexpr tools::Long Y() const
constexpr tools::Long X() const
virtual const tools::Rectangle & GetSnapRect() const override
tools::Rectangle maSnapRect
void AddHdl(std::unique_ptr< SdrHdl > pHdl)
All geometrical data of an arbitrary object for use in undo/redo.
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect)
void BroadcastObjectChange() const
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
SdrObjUserCall * m_pUserCall
virtual const OUString & GetName() const
sdr::contact::ViewContact & GetViewContact() const
virtual void SetChanged()
SdrObject * getParentSdrObjectFromSdrObject() const
void NbcRotateGluePoints(const Point &rRef, Degree100 nAngle, double sn, double cs)
void SetGlueReallyAbsolute(bool bOn)
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void transform(const basegfx::B2DHomMatrix &rMatrix)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
void translate(double fX, double fY, double fZ)
void scale(double fX, double fY, double fZ)
BASEGFX_DLLPUBLIC void transform(const B3DHomMatrix &rMatrix)
basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D &aViewInformation) const
OUString SvxResId(TranslateId aId)
E3dScene * fillViewInformation3DForCompoundObject(drawinglayer::geometry::ViewInformation3D &o_rViewInformation3D, const E3dCompoundObject &rCandidate)
support for getting a ViewInformation3D for a given CompoudObject3D with correct ObjectTransformation...
B3DPolyPolygon createCubePolyPolygonFromB3DRange(const B3DRange &rRange)
B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat)
B2IRange fround(const B2DRange &rRange)
E3dScene * DynCastE3dScene(SdrObject *pObj)