1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0029372: Graphic3d_TransformPers - improve description of Local Coordinate system defined by Transformation Persistence

This commit is contained in:
kgv
2017-12-07 10:57:26 +03:00
committed by bugmaster
parent 5dc0517d2d
commit 67160f4e79
2 changed files with 37 additions and 5 deletions

View File

@@ -59,10 +59,16 @@ public:
//! Returns information on whether the object accepts display in HLR mode or not.
PrsMgr_TypeOfPresentation3d TypeOfPresentation3d() const { return myTypeOfPresentation3d; }
//! @return transform persistence of the presentable object.
//! Returns Transformation Persistence defining a special Local Coordinate system where this presentable object is located or NULL handle if not defined.
//! Position of the object having Transformation Persistence is mutable and depends on camera position.
//! The same applies to a bounding box of the object.
//! @sa Graphic3d_TransformPers class description
const Handle(Graphic3d_TransformPers)& TransformPersistence() const { return myTransformPersistence; }
//! Sets up Transform Persistence for this object.
//! Sets up Transform Persistence defining a special Local Coordinate system where this object should be located.
//! Note that management of Transform Persistence object is more expensive than of the normal one,
//! because it requires its position being recomputed basing on camera position within each draw call / traverse.
//! @sa Graphic3d_TransformPers class description
Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers);
//! Sets up Transform Persistence Mode for this object.
@@ -114,26 +120,38 @@ public:
Standard_EXPORT void ToBeUpdated (TColStd_ListOfInteger& ListOfMode) const;
//! Return the local transformation.
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
const Handle(Geom_Transformation)& LocalTransformationGeom() const { return myLocalTransformation; }
//! Sets local transformation to theTransformation.
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
void SetLocalTransformation (const gp_Trsf& theTrsf) { setLocalTransformation (new Geom_Transformation (theTrsf)); }
//! Sets local transformation to theTransformation.
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
void SetLocalTransformation (const Handle(Geom_Transformation)& theTrsf) { setLocalTransformation (theTrsf); }
//! Returns true if object has a transformation that is different from the identity.
Standard_Boolean HasTransformation() const { return !myTransformation.IsNull() && myTransformation->Form() != gp_Identity; }
//! Return the transformation taking into account transformation of parent object(s).
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
const Handle(Geom_Transformation)& TransformationGeom() const { return myTransformation; }
//! Return the local transformation.
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
const gp_Trsf& LocalTransformation() const { return !myLocalTransformation.IsNull()
? myLocalTransformation->Trsf()
: getIdentityTrsf(); }
//! Return the transformation taking into account transformation of parent object(s).
//! Note that the local transformation of the object having Transformation Persistence
//! is applied within Local Coordinate system defined by this Persistence.
const gp_Trsf& Transformation() const { return !myTransformation.IsNull()
? myTransformation->Trsf()
: getIdentityTrsf(); }