Defines an occurrence of an assembly or a part in a scene graph. More...
#include <cadex/ModelData/Instance.hxx>
Public Member Functions | |
| Instance (Initialized) | |
| Instance (const UTF16String &theName) | |
| Constructor. | |
| Instance (const ModelElement &theElement, const UTF16String &theName=UTF16String()) | |
| Constructor. | |
| Instance (const ModelElement &theElement, const Geom::Transformation &theTransformation, const UTF16String &theName=UTF16String()) | |
| Constructor. | |
| void | SetReference (const ModelElement &theElement) |
| Sets a referenced object. | |
| ModelElement | Reference () const |
| Returns the referenced object. | |
| void | SetTransformation (const Geom::Transformation &theTrsf) |
| Sets transformation matrix. | |
| bool | HasTransformation () const |
| Returns true if the instance has an explicitly attached transformation matrix. | |
| const Geom::Transformation & | Transformation () const |
| Returns the transformation matrix. | |
Public Member Functions inherited from cadex::ModelData::ModelElement | |
| void | SetName (const UTF16String &theName) |
| Sets a name. | |
| UTF16String | Name () const |
| Returns a name. | |
| void | SetUuid (const Uuid &theUuid) |
| Sets an object uuid. | |
| cadex::Uuid | Uuid () const |
| Returns an object uuid. | |
| void | SetPMI (const PMI::Data &thePMI) |
| Sets the object PMI. | |
| PMI::Data | PMI () const |
| Returns the object PMI. | |
| void | Accept (ModelElementVisitor &theVisitor) const |
| Accepts an element visitor. | |
Public Member Functions inherited from cadex::BaseObject | |
| size_t | Id () const |
| Return unique identifier of public object. | |
| internal::BaseObjectImpl * | Impl () const |
| bool | IsNull () const |
| operator bool () const | |
| template<typename T > | |
| bool | IsOfType () const |
| template<typename T > | |
| T * | Impl () const |
| Reserved for internal use. | |
Static Public Member Functions | |
| static bool | CompareType (const BaseObject &theObject) |
| Returns true if theObject is an instance. | |
Static Public Member Functions inherited from cadex::ModelData::ModelElement | |
| static bool | CompareType (const BaseObject &theObject) |
| Returns true if theObject is a model element. | |
Additional Inherited Members | |
Public Types inherited from cadex::BaseObject | |
| typedef std::shared_ptr< internal::BaseObjectImpl > | ImplType |
Protected Member Functions inherited from cadex::ModelData::ModelElement | |
| ModelElement (const ImplType &theImpl) | |
Protected Member Functions inherited from cadex::BaseObject | |
| BaseObject (const ImplType &theImpl) | |
Defines an occurrence of an assembly or a part in a scene graph.
Instance contains a reference to another element part or assembly and is used to share data, e.g. two instances can share the same part while adding their own transformations.
|
explicit |
Constructor.
Creates an instance with the specified name.
|
explicit |
Constructor.
Creates an instance referencing theElement with the provided name. If theElement is null (IsNull()), no reference is set.
| cadex::ModelData::Instance::Instance | ( | const ModelElement & | theElement, |
| const Geom::Transformation & | theTransformation, | ||
| const UTF16String & | theName = UTF16String() ) |
Constructor.
Creates an instance referencing theElement with the provided name and transformation. If theElement is null (IsNull()), no reference is set.
| bool cadex::ModelData::Instance::HasTransformation | ( | ) | const |
Returns true if the instance has an explicitly attached transformation matrix.
Returns true if the matrix has been assigned with SetTransformation() and false otherwise.
| ModelElement cadex::ModelData::Instance::Reference | ( | ) | const |
Returns the referenced object.
Returns null if the instance does not refer to any object.
| const Geom::Transformation & cadex::ModelData::Instance::Transformation | ( | ) | const |
Returns the transformation matrix.
If the matrix has not been explicitly assigned with SetTransformation() then creates and explicitly assigns an identity matrix.