LibreOffice Module svx (master)  1
obj3d.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <o3tl/numeric.hxx>
21 
22 #include <svx/strings.hrc>
23 #include <svx/dialmgr.hxx>
24 #include <svx/svdhdl.hxx>
25 #include <svx/svdmodel.hxx>
26 #include <svx/svdobjkind.hxx>
27 #include <svx/scene3d.hxx>
28 #include <svx/obj3d.hxx>
36 #include <svx/helperhittest3d.hxx>
39 #include <com/sun/star/uno/Sequence.h>
41 #include <svx/e3dsceneupdater.hxx>
42 #include <unotools/configmgr.hxx>
43 
44 using namespace com::sun::star;
45 
46 std::unique_ptr<sdr::properties::BaseProperties> E3dObject::CreateObjectSpecificProperties()
47 {
48  return std::make_unique<sdr::properties::E3dProperties>(*this);
49 }
50 
52 : SdrAttrObj(rSdrModel),
53  mbTfHasChanged(true),
55 {
56  m_bIs3DObj = true;
57  m_bClosedObj = true;
58 }
59 
60 E3dObject::E3dObject(SdrModel& rSdrModel, E3dObject const & rSource)
61 : SdrAttrObj(rSdrModel, rSource),
62  mbTfHasChanged(true),
64 {
65  m_bIs3DObj = true;
66  m_bClosedObj = true;
67 
68  // BoundVol can be copied since also the children are copied
71 
72  // Because the parent may have changed, definitely redefine the total
73  // transformation next time
75 
76  // Copy selection status
77  mbIsSelected = rSource.mbIsSelected;
78 }
79 
81 {
82 }
83 
84 void E3dObject::SetSelected(bool bNew)
85 {
86  if(mbIsSelected != bNew)
87  {
88  mbIsSelected = bNew;
89  }
90 }
91 
92 // Break, default implementations
94 {
95  return false;
96 }
97 
98 std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> E3dObject::GetBreakObj()
99 {
100  return nullptr;
101 }
102 
104 {
105  return SdrInventor::E3d;
106 }
107 
109 {
110  return SdrObjKind::E3D_Object;
111 }
112 
113 // Determine the capabilities of the object
115 {
116  rInfo.bResizeFreeAllowed = true;
117  rInfo.bResizePropAllowed = true;
118  rInfo.bRotateFreeAllowed = true;
119  rInfo.bRotate90Allowed = true;
120  rInfo.bMirrorFreeAllowed = false;
121  rInfo.bMirror45Allowed = false;
122  rInfo.bMirror90Allowed = false;
123  rInfo.bShearAllowed = false;
124  rInfo.bEdgeRadiusAllowed = false;
125  rInfo.bCanConvToPath = false;
126 
127  // no transparence for 3d objects
128  rInfo.bTransparenceAllowed = false;
129 
130  // Convert 3D objects in a group of polygons:
131  // At first not only possible, because the creation of a group of
132  // 2D polygons would be required which need to be sorted by depth,
133  // ie at intersections be cut relative to each other. Also the texture
134  // coordinates were an unsolved problem.
135  rInfo.bCanConvToPoly = false;
136  rInfo.bCanConvToContour = false;
137  rInfo.bCanConvToPathLineToArea = false;
138  rInfo.bCanConvToPolyLineToArea = false;
139 }
140 
141 // resize object, used from old 2d interfaces, e.g. in Move/Scale dialog (F4)
142 void E3dObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
143 {
144  // Movement in X, Y in the eye coordinate system
146 
147  if(nullptr == pScene)
148  {
149  return;
150  }
151 
152  // transform pos from 2D world to 3D eye
155  basegfx::B2DPoint aScaleCenter2D(static_cast<double>(rRef.X()), static_cast<double>(rRef.Y()));
156  basegfx::B2DHomMatrix aInverseSceneTransform(rVCScene.getObjectTransformation());
157 
158  aInverseSceneTransform.invert();
159  aScaleCenter2D = aInverseSceneTransform * aScaleCenter2D;
160 
161  basegfx::B3DPoint aScaleCenter3D(aScaleCenter2D.getX(), aScaleCenter2D.getY(), 0.5);
162  basegfx::B3DHomMatrix aInverseViewToEye(aViewInfo3D.getDeviceToView() * aViewInfo3D.getProjection());
163 
164  aInverseViewToEye.invert();
165  aScaleCenter3D = aInverseViewToEye * aScaleCenter3D;
166 
167  // Get scale factors
168  double fScaleX(xFact);
169  double fScaleY(yFact);
170 
171  // build transform
172  basegfx::B3DHomMatrix aInverseOrientation(aViewInfo3D.getOrientation());
173  aInverseOrientation.invert();
174  basegfx::B3DHomMatrix aFullTransform(GetFullTransform());
175  basegfx::B3DHomMatrix aTrans(aFullTransform);
176 
177  aTrans *= aViewInfo3D.getOrientation();
178  aTrans.translate(-aScaleCenter3D.getX(), -aScaleCenter3D.getY(), -aScaleCenter3D.getZ());
179  aTrans.scale(fScaleX, fScaleY, 1.0);
180  aTrans.translate(aScaleCenter3D.getX(), aScaleCenter3D.getY(), aScaleCenter3D.getZ());
181  aTrans *= aInverseOrientation;
182  aFullTransform.invert();
183  aTrans *= aFullTransform;
184 
185  // Apply
186  basegfx::B3DHomMatrix aObjTrans(GetTransform());
187  aObjTrans *= aTrans;
188 
189  E3DModifySceneSnapRectUpdater aUpdater(this);
190  SetTransform(aObjTrans);
191 }
192 
193 // Move object in 2D is needed when using cursor keys
194 void E3dObject::NbcMove(const Size& rSize)
195 {
196  // Movement in X, Y in the eye coordinate system
198 
199  if(nullptr == pScene)
200  {
201  return;
202  }
203 
204  //Dimensions of the scene in 3D and 2D for comparison
205  tools::Rectangle aRect = pScene->GetSnapRect();
206  basegfx::B3DHomMatrix aInvDispTransform;
208 
209  if(nullptr != pParent)
210  {
211  aInvDispTransform = pParent->GetFullTransform();
212  aInvDispTransform.invert();
213  }
214 
215  // BoundVolume from 3d world to 3d eye
218  basegfx::B3DRange aEyeVol(pScene->GetBoundVolume());
219  aEyeVol.transform(aViewInfo3D.getOrientation());
220 
221  if ((aRect.GetWidth() == 0) || (aRect.GetHeight() == 0))
222  throw o3tl::divide_by_zero();
223 
224  // build relative movement vector in eye coordinates
225  basegfx::B3DPoint aMove(
226  static_cast<double>(rSize.Width()) * aEyeVol.getWidth() / static_cast<double>(aRect.GetWidth()),
227  static_cast<double>(-rSize.Height()) * aEyeVol.getHeight() / static_cast<double>(aRect.GetHeight()),
228  0.0);
229  basegfx::B3DPoint aPos(0.0, 0.0, 0.0);
230 
231  // movement vector to local coordinates of objects' parent
232  basegfx::B3DHomMatrix aInverseOrientation(aViewInfo3D.getOrientation());
233  aInverseOrientation.invert();
234  basegfx::B3DHomMatrix aCompleteTrans(aInvDispTransform * aInverseOrientation);
235 
236  aMove = aCompleteTrans * aMove;
237  aPos = aCompleteTrans * aPos;
238 
239  // build transformation and apply
240  basegfx::B3DHomMatrix aTranslate;
241  aTranslate.translate(aMove.getX() - aPos.getX(), aMove.getY() - aPos.getY(), aMove.getZ() - aPos.getZ());
242 
243  E3DModifySceneSnapRectUpdater aUpdater(pScene);
244  SetTransform(aTranslate * GetTransform());
245 }
246 
248 {
250 }
251 
252 // Inform parent of changes in the structure (eg by transformation), in this
253 // process the object in which the change has occurred is returned.
255 {
257 
258  if(nullptr != pParent)
259  {
260  pParent->InvalidateBoundVolume();
261  pParent->StructureChanged();
262  }
263 }
264 
266 {
267  return dynamic_cast< E3dScene* >(getParentSdrObjectFromSdrObject());
268 }
269 
270 // Determine the top-level scene object
272 {
274 
275  if(nullptr != pParent)
276  {
277  return pParent->getRootE3dSceneFromE3dObject();
278  }
279 
280  return nullptr;
281 }
282 
283 // Calculate enclosed volume, including all child objects
285 {
286  basegfx::B3DRange aRetval;
287  if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing
288  return aRetval;
289 
290  const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
291 
292  if(pVCOfE3D)
293  {
294  // BoundVolume is without 3D object transformation, use correct sequence
296 
297  if(!xLocalSequence.empty())
298  {
299  const uno::Sequence< beans::PropertyValue > aEmptyParameters;
300  const drawinglayer::geometry::ViewInformation3D aLocalViewInformation3D(aEmptyParameters);
301 
302  aRetval = xLocalSequence.getB3DRange(aLocalViewInformation3D);
303  }
304  }
305 
306  return aRetval;
307 }
308 
309 // Get enclosed volume and possibly recalculate it
311 {
313  {
314  const_cast< E3dObject* >(this)->maLocalBoundVol = RecalcBoundVolume();
315  }
316 
317  return maLocalBoundVol;
318 }
319 
321 {
323 }
324 
325 // Pass on the changes in transformation to all child objects
327 {
329  mbTfHasChanged = true;
330 }
331 
332 // Define the hierarchical transformation over all Parents, store in
333 // maFullTransform and return them
335 {
336  if(mbTfHasChanged)
337  {
338  basegfx::B3DHomMatrix aNewFullTransformation(maTransformation);
340 
341  if(nullptr != pParent)
342  {
343  aNewFullTransformation = pParent->GetFullTransform() * aNewFullTransformation;
344  }
345 
346  const_cast< E3dObject* >(this)->maFullTransform = aNewFullTransformation;
347  const_cast< E3dObject* >(this)->mbTfHasChanged = false;
348  }
349 
350  return maFullTransform;
351 }
352 
354 {
355  if(maTransformation != rMatrix)
356  {
357  maTransformation = rMatrix;
360  }
361 }
362 
363 // Set transformation matrix with repaint broadcast
365 {
366  if(rMatrix != maTransformation)
367  {
368  NbcSetTransform(rMatrix);
369  SetChanged();
372  }
373 }
374 
376 {
377  const basegfx::B3DRange aBoundVolume(GetBoundVolume());
379 }
380 
381 // Get the name of the object (singular)
383 {
384  OUString sName = SvxResId(STR_ObjNameSingulObj3d);
385 
386  OUString aName(GetName());
387  if (!aName.isEmpty())
388  {
389  sName += " '" + aName + "'";
390  }
391  return sName;
392 }
393 
394 // Get the name of the object (plural)
396 {
397  return SvxResId(STR_ObjNamePluralObj3d);
398 }
399 
401 {
402  return new E3dObject(rTargetModel, *this);
403 }
404 
405 std::unique_ptr<SdrObjGeoData> E3dObject::NewGeoData() const
406 {
407  return std::make_unique<E3DObjGeoData>();
408 }
409 
411 {
413 
414  static_cast<E3DObjGeoData &>(rGeo).maLocalBoundVol = maLocalBoundVol;
415  static_cast<E3DObjGeoData &>(rGeo).maTransformation = maTransformation;
416 }
417 
419 {
420  maLocalBoundVol = static_cast<const E3DObjGeoData &>(rGeo).maLocalBoundVol;
421  E3DModifySceneSnapRectUpdater aUpdater(this);
422  NbcSetTransform(static_cast<const E3DObjGeoData &>(rGeo).maTransformation);
424 }
425 
426 // 2D-rotation of a 3D-body, normally this is done by the scene itself.
427 // This is however a correct implementation, because everything that has
428 // happened is a rotation around the axis perpendicular to the screen and that
429 // is regardless of how the scene has been rotated up until now.
430 void E3dObject::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
431 {
432  // So currently the gluepoints are defined relative to the scene aOutRect.
433  // Before turning the gluepoints are defined relative to the page. They
434  // take no part in the rotation of the scene. To ensure this, there is the
435  // SetGlueReallyAbsolute(sal_True);
436  double fAngleInRad = toRadians(nAngle);
437 
438  basegfx::B3DHomMatrix aRotateZ;
439  aRotateZ.rotate(0.0, 0.0, fAngleInRad);
440  NbcSetTransform(aRotateZ * GetTransform());
441 
442  SetBoundAndSnapRectsDirty(); // This forces a recalculation of all BoundRects
443  NbcRotateGluePoints(rRef,nAngle,sn,cs); // Rotate the gluepoints (who still
444  // have coordinates relative to the
445  // original page)
446  SetGlueReallyAbsolute(false); // from now they are again relative to BoundRect (that is defined as aOutRect)
447 }
448 
449 std::unique_ptr<sdr::properties::BaseProperties> E3dCompoundObject::CreateObjectSpecificProperties()
450 {
451  return std::make_unique<sdr::properties::E3dCompoundProperties>(*this);
452 }
453 
455 : E3dObject(rSdrModel)
456 {
457 }
458 
460 : E3dObject(rSdrModel, rSource)
461 {
462 }
463 
465 {
466 }
467 
469 {
470  basegfx::B2DPolyPolygon aRetval;
471  const uno::Sequence< beans::PropertyValue > aEmptyParameters;
472  drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
473  E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
474 
475  if(pRootScene)
476  {
477  const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
478  const basegfx::B3DPolyPolygon aCubePolyPolygon(CreateWireframe());
480  aViewInfo3D.getObjectToView() * GetTransform());
481  aRetval.transform(rVCScene.getObjectTransformation());
482  }
483 
484  return aRetval;
485 }
486 
488 {
489  // 8 corners + 1 E3dVolumeMarker (= Wireframe representation)
490  return 9;
491 }
492 
494 {
495  const uno::Sequence< beans::PropertyValue > aEmptyParameters;
496  drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
497  E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
498 
499  if(pRootScene)
500  {
501  const basegfx::B3DRange aBoundVolume(GetBoundVolume());
502 
503  if(!aBoundVolume.isEmpty())
504  {
505  const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
506 
507  for(sal_uInt32 a(0); a < 8; a++)
508  {
509  basegfx::B3DPoint aPos3D;
510 
511  switch(a)
512  {
513  case 0 : aPos3D.setX(aBoundVolume.getMinX()); aPos3D.setY(aBoundVolume.getMinY()); aPos3D.setZ(aBoundVolume.getMinZ()); break;
514  case 1 : aPos3D.setX(aBoundVolume.getMinX()); aPos3D.setY(aBoundVolume.getMinY()); aPos3D.setZ(aBoundVolume.getMaxZ()); break;
515  case 2 : aPos3D.setX(aBoundVolume.getMinX()); aPos3D.setY(aBoundVolume.getMaxY()); aPos3D.setZ(aBoundVolume.getMinZ()); break;
516  case 3 : aPos3D.setX(aBoundVolume.getMinX()); aPos3D.setY(aBoundVolume.getMaxY()); aPos3D.setZ(aBoundVolume.getMaxZ()); break;
517  case 4 : aPos3D.setX(aBoundVolume.getMaxX()); aPos3D.setY(aBoundVolume.getMinY()); aPos3D.setZ(aBoundVolume.getMinZ()); break;
518  case 5 : aPos3D.setX(aBoundVolume.getMaxX()); aPos3D.setY(aBoundVolume.getMinY()); aPos3D.setZ(aBoundVolume.getMaxZ()); break;
519  case 6 : aPos3D.setX(aBoundVolume.getMaxX()); aPos3D.setY(aBoundVolume.getMaxY()); aPos3D.setZ(aBoundVolume.getMinZ()); break;
520  case 7 : aPos3D.setX(aBoundVolume.getMaxX()); aPos3D.setY(aBoundVolume.getMaxY()); aPos3D.setZ(aBoundVolume.getMaxZ()); break;
521  }
522 
523  // to 3d view coor
524  aPos3D *= aViewInfo3D.getObjectToView() * GetTransform();
525 
526  // create 2d relative scene
527  basegfx::B2DPoint aPos2D(aPos3D.getX(), aPos3D.getY());
528 
529  // to 2d world coor
530  aPos2D *= rVCScene.getObjectTransformation();
531 
532  rHdlList.AddHdl(std::make_unique<SdrHdl>(Point(basegfx::fround(aPos2D.getX()), basegfx::fround(aPos2D.getY())), SdrHdlKind::BezierWeight));
533  }
534  }
535  }
536 
537  const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
538 
539  if(aPolyPolygon.count())
540  {
541  rHdlList.AddHdl(std::make_unique<E3dVolumeMarker>(aPolyPolygon));
542  }
543 }
544 
546 {
548 }
549 
551 {
552  const uno::Sequence< beans::PropertyValue > aEmptyParameters;
553  drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
554  E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
556 
557  if(!pRootScene)
558  return;
559 
560  // get VC of 3D candidate
561  const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
562 
563  if(!pVCOfE3D)
564  return;
565 
566  // get 3D primitive sequence
568 
569  if(xLocalSequence.empty())
570  return;
571 
572  // get BoundVolume
573  basegfx::B3DRange aBoundVolume(xLocalSequence.getB3DRange(aViewInfo3D));
574 
575  // transform bound volume to relative scene coordinates
576  aBoundVolume.transform(aViewInfo3D.getObjectToView());
577 
578  // build 2d relative scene range
579  basegfx::B2DRange aSnapRange(
580  aBoundVolume.getMinX(), aBoundVolume.getMinY(),
581  aBoundVolume.getMaxX(), aBoundVolume.getMaxY());
582 
583  // transform to 2D world coordinates
584  const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
585  aSnapRange.transform(rVCScene.getObjectTransformation());
586 
587  // snap to integer
589  sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())),
590  sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY())));
591 }
592 
594 {
595  return new E3dCompoundObject(rTargetModel, *this);
596 }
597 
598 // convert given basegfx::B3DPolyPolygon to screen coor
600 {
601  const uno::Sequence< beans::PropertyValue > aEmptyParameters;
602  drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
603  E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
604  basegfx::B2DPolyPolygon aRetval;
605 
606  if(pRootScene)
607  {
609  aViewInfo3D.getObjectToView() * GetTransform());
610  const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
611  aRetval.transform(rVCScene.getObjectTransformation());
612  }
613 
614  return aRetval;
615 }
616 
617 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: obj3d.cxx:142
virtual OUString TakeObjNameSingul() const override
Definition: obj3d.cxx:382
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: obj3d.cxx:550
virtual void SetTransformChanged()
Definition: obj3d.cxx:326
virtual void StructureChanged() override
Definition: scene3d.cxx:371
bool m_bClosedObj
Definition: svdobj.hxx:902
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: obj3d.cxx:418
double getMinZ() const
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: obj3d.cxx:410
void SetGlueReallyAbsolute(bool bOn)
Definition: svdobj.cxx:2326
SdrInventor
Definition: svdobj.hxx:99
bool isEmpty() const
const drawinglayer::geometry::ViewInformation3D & getViewInformation3D(const ::basegfx::B3DRange &rContentRange) const
basegfx::B3DRange maLocalBoundVol
Definition: obj3d.hxx:71
B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat)
drawinglayer::primitive3d::Primitive3DContainer getViewIndependentPrimitive3DContainer() const
const basegfx::B3DHomMatrix & GetTransform() const
Definition: obj3d.hxx:112
basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon &rCandidate) const
Definition: obj3d.cxx:599
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:49
B3DPolyPolygon createCubePolyPolygonFromB3DRange(const B3DRange &rRange)
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:173
void scale(double fX, double fY, double fZ)
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:251
double getMaxZ() const
SdrObjKind
Definition: svdobjkind.hxx:24
constexpr tools::Long Width() const
basegfx::B3DHomMatrix maTransformation
Definition: obj3d.hxx:72
Provides information about various ZObject properties.
Definition: svdobj.hxx:195
virtual SdrInventor GetObjInventor() const override
Definition: obj3d.cxx:103
bool mbTfHasChanged
Definition: obj3d.hxx:76
virtual SdrObjKind GetObjIdentifier() const override
Definition: obj3d.cxx:108
virtual SdrObjKind GetObjIdentifier() const override
Definition: obj3d.cxx:545
double getMinX() const
virtual void StructureChanged()
Definition: obj3d.cxx:254
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: obj3d.cxx:487
virtual bool IsBreakObjPossible()
Definition: obj3d.cxx:93
static bool IsFuzzing()
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
constexpr tools::Long GetWidth() const
void setZ(double fZ)
tools::Rectangle maSnapRect
Definition: svdoattr.hxx:41
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: obj3d.cxx:493
B2IRange fround(const B2DRange &rRange)
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect)
Definition: svdobj.cxx:135
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:510
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: obj3d.cxx:430
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:353
double getY() const
E3dScene * getParentE3dSceneFromE3dObject() const
Definition: obj3d.cxx:265
virtual E3dObject * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: obj3d.cxx:400
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1921
void setY(double fY)
uno_Any a
double getX() const
OUString sName
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: obj3d.cxx:114
void BroadcastObjectChange() const
Definition: svdobj.cxx:1001
bool mbIsSelected
Definition: obj3d.hxx:77
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1898
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:884
void transform(const basegfx::B2DHomMatrix &rMatrix)
const basegfx::B3DHomMatrix & getObjectToView() const
const basegfx::B3DRange & GetBoundVolume() const
Definition: obj3d.cxx:310
double toRadians(D x)
double getMinY() const
const basegfx::B3DHomMatrix & GetFullTransform() const
Definition: obj3d.cxx:334
virtual basegfx::B3DRange RecalcBoundVolume() const
Definition: obj3d.cxx:284
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...
Definition: obj3d.cxx:405
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: obj3d.cxx:46
BASEGFX_DLLPUBLIC void transform(const B3DHomMatrix &rMatrix)
void translate(double fX, double fY, double fZ)
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:364
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: obj3d.cxx:468
sal_uInt32 count() const
drawinglayer::primitive3d::Primitive3DContainer const & getVIP3DSWithoutObjectTransform() const
E3dObject(SdrModel &rSdrModel)
Definition: obj3d.cxx:51
const basegfx::B2DHomMatrix & getObjectTransformation() const
constexpr tools::Long Height() const
OUString aName
void setX(double fX)
SdrObject * getParentSdrObjectFromSdrObject() const
Definition: svdobj.cxx:743
virtual ~E3dCompoundObject() override
Definition: obj3d.cxx:464
virtual void NbcMove(const Size &rSize) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: obj3d.cxx:194
bool m_bIs3DObj
Definition: svdobj.hxx:904
bool mbIsSelected
Helper for 3d object changes affecting 2d geometry.
void rotate(double fAngleX, double fAngleY, double fAngleZ)
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: obj3d.cxx:449
double getMaxX() const
E3dCompoundObject(SdrModel &rSdrModel, E3dCompoundObject const &rSource)
Definition: obj3d.cxx:459
virtual void SetSelected(bool bNew)
Definition: obj3d.cxx:84
virtual E3dScene * getRootE3dSceneFromE3dObject() const
Definition: obj3d.cxx:271
virtual std::unique_ptr< SdrAttrObj, SdrObjectFreeOp > GetBreakObj()
Definition: obj3d.cxx:98
virtual void SetChanged()
Definition: svdobj.cxx:1025
virtual ~E3dObject() override
Definition: obj3d.cxx:80
double getMaxY() const
virtual E3dCompoundObject * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: obj3d.cxx:593
basegfx::B3DPolyPolygon CreateWireframe() const
Definition: obj3d.cxx:375
const OUString & GetName() const
Definition: svdobj.cxx:792
virtual E3dScene * getRootE3dSceneFromE3dObject() const override
Definition: scene3d.cxx:387
void InvalidateBoundVolume()
Definition: obj3d.cxx:320
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: obj3d.cxx:247
void AddHdl(std::unique_ptr< SdrHdl > pHdl)
Definition: svdhdl.cxx:2290
virtual OUString TakeObjNamePlural() const override
Definition: obj3d.cxx:395
basegfx::B3DHomMatrix maFullTransform
Definition: obj3d.hxx:73
bool m_bDetectedRangeSegmentation false
constexpr tools::Long GetHeight() const
void NbcRotateGluePoints(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:2336
E3dScene * fillViewInformation3DForCompoundObject(drawinglayer::geometry::ViewInformation3D &o_rViewInformation3D, const E3dCompoundObject &rCandidate)
support for getting a ViewInformation3D for a given CompoudObject3D with correct ObjectTransformation...