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>
39#include <com/sun/star/uno/Sequence.h>
43
44using namespace com::sun::star;
45
46std::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),
54 mbIsSelected(false)
55{
56 m_bIs3DObj = true;
57 m_bClosedObj = true;
58}
59
60E3dObject::E3dObject(SdrModel& rSdrModel, E3dObject const & rSource)
61: SdrAttrObj(rSdrModel, rSource),
62 mbTfHasChanged(true),
63 mbIsSelected(false)
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
85{
86 if(mbIsSelected != bNew)
87 {
88 mbIsSelected = bNew;
89 }
90}
91
92// Break, default implementations
94{
95 return false;
96}
97
99{
100 return nullptr;
101}
102
104{
105 return SdrInventor::E3d;
106}
107
109{
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)
142void 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
187 aObjTrans *= aTrans;
188
189 E3DModifySceneSnapRectUpdater aUpdater(this);
190 SetTransform(aObjTrans);
191}
192
193// Move object in 2D is needed when using cursor keys
194void 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{
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{
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
405std::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.
430void 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
449std::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{
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 if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing
553 return;
554
555 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
556 drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
557 E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
559
560 if(!pRootScene)
561 return;
562
563 // get VC of 3D candidate
564 const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
565
566 if(!pVCOfE3D)
567 return;
568
569 // get 3D primitive sequence
571
572 if(xLocalSequence.empty())
573 return;
574
575 // get BoundVolume
576 basegfx::B3DRange aBoundVolume(xLocalSequence.getB3DRange(aViewInfo3D));
577
578 // transform bound volume to relative scene coordinates
579 aBoundVolume.transform(aViewInfo3D.getObjectToView());
580
581 // build 2d relative scene range
582 basegfx::B2DRange aSnapRange(
583 aBoundVolume.getMinX(), aBoundVolume.getMinY(),
584 aBoundVolume.getMaxX(), aBoundVolume.getMaxY());
585
586 // transform to 2D world coordinates
587 const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
588 aSnapRange.transform(rVCScene.getObjectTransformation());
589
590 // snap to integer
592 sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())),
593 sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY())));
594}
595
597{
598 return new E3dCompoundObject(rTargetModel, *this);
599}
600
601// convert given basegfx::B3DPolyPolygon to screen coor
603{
604 const uno::Sequence< beans::PropertyValue > aEmptyParameters;
605 drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
606 E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
608
609 if(pRootScene)
610 {
612 aViewInfo3D.getObjectToView() * GetTransform());
613 const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
614 aRetval.transform(rVCScene.getObjectTransformation());
615 }
616
617 return aRetval;
618}
619
620/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbIsSelected
Helper for 3d object changes affecting 2d geometry.
virtual SdrObjKind GetObjIdentifier() const override
Definition: obj3d.cxx:545
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: obj3d.cxx:596
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: obj3d.cxx:468
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: obj3d.cxx:493
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: obj3d.cxx:550
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
Definition: obj3d.cxx:449
E3dCompoundObject(SdrModel &rSdrModel, E3dCompoundObject const &rSource)
Definition: obj3d.cxx:459
virtual ~E3dCompoundObject() override
Definition: obj3d.cxx:464
basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon &rCandidate) const
Definition: obj3d.cxx:602
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: obj3d.cxx:487
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: obj3d.cxx:430
void InvalidateBoundVolume()
Definition: obj3d.cxx:320
virtual void StructureChanged()
Definition: obj3d.cxx:254
basegfx::B3DPolyPolygon CreateWireframe() const
Definition: obj3d.cxx:375
virtual void SetTransformChanged()
Definition: obj3d.cxx:326
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:364
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: obj3d.cxx:400
const basegfx::B3DRange & GetBoundVolume() const
Definition: obj3d.cxx:310
virtual basegfx::B3DRange RecalcBoundVolume() const
Definition: obj3d.cxx:284
const basegfx::B3DHomMatrix & GetTransform() const
Definition: obj3d.hxx:112
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 mbTfHasChanged
Definition: obj3d.hxx:76
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:353
virtual E3dScene * getRootE3dSceneFromE3dObject() const
Definition: obj3d.cxx:271
basegfx::B3DHomMatrix maTransformation
Definition: obj3d.hxx:72
basegfx::B3DRange maLocalBoundVol
Definition: obj3d.hxx:71
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: obj3d.cxx:142
E3dObject(SdrModel &rSdrModel)
Definition: obj3d.cxx:51
bool mbIsSelected
Definition: obj3d.hxx:77
const basegfx::B3DHomMatrix & GetFullTransform() const
Definition: obj3d.cxx:334
E3dScene * getParentE3dSceneFromE3dObject() const
Definition: obj3d.cxx:265
virtual void SetSelected(bool bNew)
Definition: obj3d.cxx:84
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: obj3d.cxx:410
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: obj3d.cxx:418
virtual ~E3dObject() override
Definition: obj3d.cxx:80
virtual OUString TakeObjNamePlural() const override
Definition: obj3d.cxx:395
virtual rtl::Reference< SdrAttrObj > GetBreakObj()
Definition: obj3d.cxx:98
virtual SdrObjKind GetObjIdentifier() const override
Definition: obj3d.cxx:108
virtual OUString TakeObjNameSingul() const override
Definition: obj3d.cxx:382
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::B3DHomMatrix maFullTransform
Definition: obj3d.hxx:73
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: obj3d.cxx:247
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: obj3d.cxx:114
virtual SdrInventor GetObjInventor() const override
Definition: obj3d.cxx:103
virtual bool IsBreakObjPossible()
Definition: obj3d.cxx:93
virtual E3dScene * getRootE3dSceneFromE3dObject() const override
Definition: scene3d.cxx:387
virtual void StructureChanged() override
Definition: scene3d.cxx:371
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:49
tools::Rectangle maSnapRect
Definition: svdoattr.hxx:41
void AddHdl(std::unique_ptr< SdrHdl > pHdl)
Definition: svdhdl.cxx:2291
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:175
Provides information about various ZObject properties.
Definition: svdobj.hxx:197
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect)
Definition: svdobj.cxx:135
bool m_bIs3DObj
Definition: svdobj.hxx:923
void BroadcastObjectChange() const
Definition: svdobj.cxx:978
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1926
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1903
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:903
const OUString & GetName() const
Definition: svdobj.cxx:769
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:261
virtual void SetChanged()
Definition: svdobj.cxx:1002
SdrObject * getParentSdrObjectFromSdrObject() const
Definition: svdobj.cxx:720
bool m_bClosedObj
Definition: svdobj.hxx:921
void NbcRotateGluePoints(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:2341
void SetGlueReallyAbsolute(bool bOn)
Definition: svdobj.cxx:2331
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:509
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void transform(const basegfx::B2DHomMatrix &rMatrix)
sal_uInt32 count() const
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)
double getMinZ() const
BASEGFX_DLLPUBLIC void transform(const B3DHomMatrix &rMatrix)
double getHeight() const
double getMaxZ() const
double getMinX() const
bool isEmpty() const
double getWidth() const
double getMinY() const
double getMaxX() const
double getMaxY() const
TYPE getMaxX() const
TYPE getMinX() const
TYPE getMinY() const
TYPE getMaxY() const
TYPE getX() const
TYPE getY() const
void setX(TYPE fX)
TYPE getX() const
TYPE getZ() const
TYPE getY() const
void setY(TYPE fY)
void setZ(TYPE fZ)
const basegfx::B3DHomMatrix & getObjectToView() const
const basegfx::B3DHomMatrix & getDeviceToView() const
const basegfx::B3DHomMatrix & getProjection() const
const basegfx::B3DHomMatrix & getOrientation() const
basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D &aViewInformation) const
const drawinglayer::geometry::ViewInformation3D & getViewInformation3D(const ::basegfx::B3DRange &rContentRange) const
const basegfx::B2DHomMatrix & getObjectTransformation() const
drawinglayer::primitive3d::Primitive3DContainer const & getVIP3DSWithoutObjectTransform() const
drawinglayer::primitive3d::Primitive3DContainer getViewIndependentPrimitive3DContainer() const
constexpr tools::Long GetWidth() const
constexpr tools::Long GetHeight() const
static bool IsFuzzing()
double toRadians(D x)
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
OUString sName
E3dScene * fillViewInformation3DForCompoundObject(drawinglayer::geometry::ViewInformation3D &o_rViewInformation3D, const E3dCompoundObject &rCandidate)
support for getting a ViewInformation3D for a given CompoudObject3D with correct ObjectTransformation...
OUString aName
uno_Any a
B3DPolyPolygon createCubePolyPolygonFromB3DRange(const B3DRange &rRange)
B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat)
B2IRange fround(const B2DRange &rRange)
E3dScene * DynCastE3dScene(SdrObject *pObj)
Definition: svdobj.cxx:3203
SdrInventor
Definition: svdobj.hxx:99
SdrObjKind
Definition: svdobjkind.hxx:25
@ E3D_CompoundObject