Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_SceneGraphElement Class Reference

Base class for part, instance and assembly. More...

#include <cadex/ModelData_SceneGraphElement.hxx>

Inheritance diagram for cadex::ModelData_SceneGraphElement:
cadex::ModelData_BaseObject cadex::ModelData_Assembly cadex::ModelData_Instance cadex::ModelData_Part

Classes

class  LayerIterator
 Iterator over layers this element belongs to. More...
 

Public Types

typedef cadex::internal::ModelData_SceneGraphElementImpl ImplType
 
- Public Types inherited from cadex::ModelData_BaseObject
typedef int IdType
 Defines a type identifier.
 

Public Member Functions

 ModelData_SceneGraphElement ()
 Constructor.
 
void SetAppearance (const ModelData_Appearance &theAppearance)
 Sets appearance of the scene graph element.
 
ModelData_Appearance Appearance () const
 Returns the scene graph element's own appearance.
 
void AddProperties (const ModelData_PropertyTable &theProperties)
 Adds a property table to the element.
 
ModelData_PropertyTable Properties () const
 Returns a property table.
 
void AddPMI (const ModelData_PMITable &thePMI)
 Adds a PMI table to the element.
 
ModelData_PMITable PMI () const
 Returns a PMI table.
 
void AddConfigurations (const ModelData_ConfigurationManager &theConfigurations)
 Adds a configuration manager to the element.
 
ModelData_ConfigurationManager Configurations () const
 Returns a configuration manager.
 
void AddToLayer (const ModelData_Layer &theLayer)
 Adds element to layer.
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor.
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor.
 
IdType TypeId () const
 Returns an object type id.
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T.
 
void SetName (const Base_UTF16String &theName)
 Sets an object name.
 
Base_UTF16String Name () const
 
void SetUuid (const Base_Uuid &theUuid)
 
Base_Uuid Uuid () const
 
void Nullify ()
 Resets reference to implementation object.
 
bool IsNull () const
 Returns true if the object is nullified.
 
 operator bool () const
 Casts the object to the bool type.
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
 

Protected Member Functions

 ModelData_SceneGraphElement (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_SceneGraphElement (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
- Protected Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Constructor & Destructor Documentation

◆ ModelData_SceneGraphElement()

cadex::ModelData_SceneGraphElement::ModelData_SceneGraphElement ( )
inline

Constructor.

Creates a null object (see IsNull()).

Member Function Documentation

◆ Accept()

void cadex::ModelData_SceneGraphElement::Accept ( ModelData_Model::ElementVisitor theVisitor) const

Accepts an element visitor.

The order of visiting depends on the type of this object:

  • for a part invokes a visitor for the part (ModelData_Model::ElementVisitor::operator());
  • for an instance first enters the instance by calling ModelData_Model::ElementVisitor::VisitEnter()). If it returns true then visits the referred element. Then leaves the instance calling ModelData_Model::ElementVisitor::VisitLeave().
  • for an assembly first enters the assembly by calling ModelData_Model::ElementVisitor::VisitEnter()). If it returns true then visits all the assembly children. Then leaves the assembly calling ModelData_Model::ElementVisitor::VisitLeave().

◆ AddPMI()

void cadex::ModelData_SceneGraphElement::AddPMI ( const ModelData_PMITable thePMI)

Adds a PMI table to the element.

If this object did not have PMI yet, then thePMI are just linked to this object. Otherwise, the elements of thePMI are appended to existing PMI table (see ModelData_PMITable::Add (const ModelData_PMITable&).

Must not be called on IsNull() object. Otherwise behavior is undefined.

Examples
meshing/remeshing/main.cxx.

◆ AddProperties()

void cadex::ModelData_SceneGraphElement::AddProperties ( const ModelData_PropertyTable theProperties)

Adds a property table to the element.

If this object did not have properties yet, then theProperties are just linked to this object. Otherwise, the elements of theProperties are appended to existing property table (see ModelData_PropertyTable::Add (const ModelData_PropertyTable&).

Must not be called on IsNull() object. Otherwise behavior is undefined.

Examples
meshing/remeshing/main.cxx, modeling/metadata/Program.cs, and modeling/metadata/main.cxx.

◆ Appearance()

◆ SetAppearance()

void cadex::ModelData_SceneGraphElement::SetAppearance ( const ModelData_Appearance theAppearance)

Sets appearance of the scene graph element.

Note
By convention assemblies may not have appearances. If one is set using this function it can be ignored by other CAD Exchanger functions (e.g. export).
See also
Visual Appearances
Examples
meshing/remeshing/main.cxx, modification/coloring/Program.cs, and modification/coloring/main.cxx.