Hide menu

Defines a leaf node in the scene graph hiearchy. More...

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

Public Types

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

Public Member Functions

 ModelData_Part ()
 
 ModelData_Part (initialized)
 
 ModelData_Part (ImplType *theImpl)
 
 ModelData_Part (const Base_UTF16String &theName)
 
 ModelData_Part (const ModelData_Representation &theRep, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theLOD, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theFineLOD, const ModelData_PolyRepresentation &theCoarseLOD, const Base_UTF16String &theName=Base_UTF16String())
 
 ModelData_Part (const ModelData_BRepRepresentation &theRep, const ModelData_PolyRepresentation &theFineLOD, const ModelData_PolyRepresentation &theMediumLOD, const ModelData_PolyRepresentation &theCoarseLOD, const Base_UTF16String &theName=Base_UTF16String())
 
void AddRepresentation (const ModelData_Representation &theRepresentation)
 Adds a representation.
 
ModelData_BRepRepresentation BRepRepresentation () const
 
ModelData_PolyRepresentation PolyRepresentation (ModelData_RepresentationMask theRepresentationMask) const
 
void Accept (RepresentationVisitor &theVisitor) const
 Accepts a visitor of the associated representations. More...
 
void Accept (RepresentationVisitor &theVisitor, int theRepresentationMask) const
 Accepts a visitor of the associated representations. More...
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor. More...
 
- Public Member Functions inherited from cadex::ModelData_SceneGraphElement
 ModelData_SceneGraphElement ()
 Constructor. More...
 
void SetAppearance (const ModelData_Appearance &theAppearance)
 Sets appearance of the scene graph element. More...
 
ModelData_Appearance Appearance () const
 Returns the scene graph element's own appearance. More...
 
void AddProperties (const ModelData_PropertyTable &theProperties)
 Adds a property table to the element. More...
 
ModelData_PropertyTable Properties () const
 Returns a property table.
 
void AddPMI (const ModelData_PMITable &thePMI)
 Adds a PMI table to the element. More...
 
ModelData_PMITable PMI () const
 Returns a PMI table.
 
void AddToLayer (const ModelData_Layer &theLayer)
 Adds element to layer.
 
void Accept (ModelData_Model::ElementVisitor &theVisitor) const
 Accepts an element visitor. More...
 
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor. More...
 
IdType TypeId () const
 Returns an object type id. More...
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T. More...
 
void SetName (const Base_UTF16String &theName)
 Sets an object name. More...
 
Base_UTF16String Name () const
 
void SetUuid (const Base_Uuid &theUuid)
 
Base_Uuid Uuid () const
 
void Nullify ()
 Resets reference to implementation object. More...
 
bool IsNull () const
 Returns true if the object is nullified. More...
 
 operator bool () const
 Casts the object to the bool type. More...
 
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
 
const internal::Base_Handle & HImpl () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static IdType GetTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_SceneGraphElement
 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_Part() [1/4]

cadex::ModelData_Part::ModelData_Part ( )

If theToInitialize is false then creates a null object (see IsNull()).

◆ ModelData_Part() [2/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_Representation theRep,
const Base_UTF16String theName = Base_UTF16String() 
)
explicit

Creates a part with a name and single representation.

◆ ModelData_Part() [3/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_BRepRepresentation theRep,
const ModelData_PolyRepresentation theLOD,
const Base_UTF16String theName = Base_UTF16String() 
)

Creates a part with a name, B-Rep and one polygonal representations.

◆ ModelData_Part() [4/4]

cadex::ModelData_Part::ModelData_Part ( const ModelData_BRepRepresentation theRep,
const ModelData_PolyRepresentation theFineLOD,
const ModelData_PolyRepresentation theCoarseLOD,
const Base_UTF16String theName = Base_UTF16String() 
)

Creates a part with a name, B-Rep and twp polygonal representations.

Member Function Documentation

◆ Accept() [1/3]

void cadex::ModelData_SceneGraphElement::Accept

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().

◆ Accept() [2/3]

void cadex::ModelData_Part::Accept ( RepresentationVisitor &  theVisitor) const

Accepts a visitor of the associated representations.

Applies theVisitor to each added representation. The order of visiting representations matches the order in which the representations have been added with AddRepresentation().

Examples
advgeom/meshsimplify/main.cxx, and exploring/appearance/main.cxx.

◆ Accept() [3/3]

void cadex::ModelData_Part::Accept ( RepresentationVisitor &  theVisitor,
int  theRepMask 
) const

Accepts a visitor of the associated representations.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

theRepMask is a bit-wise combination of flags defined in the ModelData_RepresentationMask enumeration.

◆ BRepRepresentation()

◆ PolyRepresentation()

ModelData_PolyRepresentation cadex::ModelData_Part::PolyRepresentation ( ModelData_RepresentationMask  theMask) const

Returns a polygonal representation that matches the specified mask. Returns null if there is no Poly representation.

Examples
exploring/polyrepresentation/main.cxx.