Open CASCADE Technology  7.2.0
Public Member Functions | Protected Member Functions | Protected Attributes

MeshVS_PrsBuilder Class Referenceabstract

This class is parent for all builders using in MeshVS_Mesh. It provides base fields and methods all buildes need. More...

#include <MeshVS_PrsBuilder.hxx>

Inheritance diagram for MeshVS_PrsBuilder:
Inheritance graph
[legend]

Public Member Functions

virtual void Build (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer DisplayMode) const =0
 Builds presentation of certain type of data. Prs is presentation object which this method constructs. IDs is set of numeric identificators forming object appearance. IDsToExclude is set of IDs to exclude from processing. If some entity has been excluded, it is not processed by other builders. IsElement indicates, IDs is identificators of nodes or elements. DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx) More...
 
virtual void CustomBuild (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
 This method is called to build presentation of custom elements (they have MeshVS_ET_0D type). IDs is set of numeric identificators of elements for custom building. IDsToExclude is set of IDs to exclude from processing. If some entity has been excluded, it is not processed by other builders. DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx) More...
 
virtual Handle< SelectBasics_SensitiveEntityCustomSensitiveEntity (const Handle< SelectBasics_EntityOwner > &Owner, const Standard_Integer SelectMode) const
 This method is called to build sensitive of custom elements ( they have MeshVS_ET_0D type ) More...
 
Standard_Integer GetFlags () const
 Returns flags, assigned with builder during creation. More...
 
virtual Standard_Boolean TestFlags (const Standard_Integer DisplayMode) const
 Test whether display mode has flags assigned with this builder. This method has default implementation and can be redefined for advance behavior Returns Standard_True only if display mode is appropriate for this builder. More...
 
Standard_Integer GetId () const
 Returns builder ID. More...
 
Standard_Integer GetPriority () const
 Returns priority; as priority bigger, as soon builder will be called. More...
 
Handle< MeshVS_DataSourceGetDataSource () const
 Returns custom data source or default ( from MeshVS_Mesh ) if custom is NULL. More...
 
void SetDataSource (const Handle< MeshVS_DataSource > &newDS)
 Change custom data source. More...
 
Handle< MeshVS_DrawerGetDrawer () const
 Returns custom drawer or default ( from MeshVS_Mesh ) if custom is NULL. More...
 
void SetDrawer (const Handle< MeshVS_Drawer > &newDr)
 Change custom drawer. More...
 
void SetExcluding (const Standard_Boolean state)
 Set excluding state. If it is Standard_True, the nodes or elements, processed by current builder will be noted and next builder won't process its. More...
 
Standard_Boolean IsExcludingOn () const
 Read excluding state. More...
 
void SetPresentationManager (const Handle< PrsMgr_PresentationManager3d > &thePrsMgr)
 Set presentation manager for builder. More...
 
Handle< PrsMgr_PresentationManager3dGetPresentationManager () const
 Get presentation manager of builder. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Member Functions

 MeshVS_PrsBuilder (const Handle< MeshVS_Mesh > &Parent, const MeshVS_DisplayModeFlags &Flags, const Handle< MeshVS_DataSource > &DS, const Standard_Integer Id, const MeshVS_BuilderPriority &Priority=MeshVS_BP_Default)
 Constructor Parent is pointer to MeshVS_Mesh object Flags is set of display modes corresponding to this builder DS is data source object, from which builder will pick geometry and topological information Id is numeric identificator of builder. You must set it to positive integer, but if you set it to -1, constructor will select the smallest integer, not occupied by other builders Priority is numerical priority constant. As priority bigger, as sooner builder starts during presentation construction. More...
 
Handle< MeshVS_DataSourceDataSource () const
 Returns only custom data source. More...
 
Handle< MeshVS_DrawerDrawer () const
 Returns only custom drawer. More...
 

Protected Attributes

MeshVS_MeshPtr myParentMesh
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

This class is parent for all builders using in MeshVS_Mesh. It provides base fields and methods all buildes need.

Constructor & Destructor Documentation

◆ MeshVS_PrsBuilder()

MeshVS_PrsBuilder::MeshVS_PrsBuilder ( const Handle< MeshVS_Mesh > &  Parent,
const MeshVS_DisplayModeFlags Flags,
const Handle< MeshVS_DataSource > &  DS,
const Standard_Integer  Id,
const MeshVS_BuilderPriority Priority = MeshVS_BP_Default 
)
protected

Constructor Parent is pointer to MeshVS_Mesh object Flags is set of display modes corresponding to this builder DS is data source object, from which builder will pick geometry and topological information Id is numeric identificator of builder. You must set it to positive integer, but if you set it to -1, constructor will select the smallest integer, not occupied by other builders Priority is numerical priority constant. As priority bigger, as sooner builder starts during presentation construction.

Member Function Documentation

◆ Build()

virtual void MeshVS_PrsBuilder::Build ( const Handle< Prs3d_Presentation > &  Prs,
const TColStd_PackedMapOfInteger IDs,
TColStd_PackedMapOfInteger IDsToExclude,
const Standard_Boolean  IsElement,
const Standard_Integer  DisplayMode 
) const
pure virtual

Builds presentation of certain type of data. Prs is presentation object which this method constructs. IDs is set of numeric identificators forming object appearance. IDsToExclude is set of IDs to exclude from processing. If some entity has been excluded, it is not processed by other builders. IsElement indicates, IDs is identificators of nodes or elements. DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx)

Implemented in MeshVS_NodalColorPrsBuilder, MeshVS_MeshPrsBuilder, MeshVS_VectorPrsBuilder, MeshVS_ElementalColorPrsBuilder, and MeshVS_TextPrsBuilder.

◆ CustomBuild()

virtual void MeshVS_PrsBuilder::CustomBuild ( const Handle< Prs3d_Presentation > &  Prs,
const TColStd_PackedMapOfInteger IDs,
TColStd_PackedMapOfInteger IDsToExclude,
const Standard_Integer  DisplayMode 
) const
virtual

This method is called to build presentation of custom elements (they have MeshVS_ET_0D type). IDs is set of numeric identificators of elements for custom building. IDsToExclude is set of IDs to exclude from processing. If some entity has been excluded, it is not processed by other builders. DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx)

◆ CustomSensitiveEntity()

virtual Handle< SelectBasics_SensitiveEntity > MeshVS_PrsBuilder::CustomSensitiveEntity ( const Handle< SelectBasics_EntityOwner > &  Owner,
const Standard_Integer  SelectMode 
) const
virtual

This method is called to build sensitive of custom elements ( they have MeshVS_ET_0D type )

◆ DataSource()

Handle< MeshVS_DataSource > MeshVS_PrsBuilder::DataSource ( ) const
protected

Returns only custom data source.

◆ Drawer()

Handle< MeshVS_Drawer > MeshVS_PrsBuilder::Drawer ( ) const
protected

Returns only custom drawer.

◆ GetDataSource()

Handle< MeshVS_DataSource > MeshVS_PrsBuilder::GetDataSource ( ) const

Returns custom data source or default ( from MeshVS_Mesh ) if custom is NULL.

◆ GetDrawer()

Handle< MeshVS_Drawer > MeshVS_PrsBuilder::GetDrawer ( ) const

Returns custom drawer or default ( from MeshVS_Mesh ) if custom is NULL.

◆ GetFlags()

Standard_Integer MeshVS_PrsBuilder::GetFlags ( ) const

Returns flags, assigned with builder during creation.

◆ GetId()

Standard_Integer MeshVS_PrsBuilder::GetId ( ) const

Returns builder ID.

◆ GetPresentationManager()

Handle< PrsMgr_PresentationManager3d > MeshVS_PrsBuilder::GetPresentationManager ( ) const

Get presentation manager of builder.

◆ GetPriority()

Standard_Integer MeshVS_PrsBuilder::GetPriority ( ) const

Returns priority; as priority bigger, as soon builder will be called.

◆ IsExcludingOn()

Standard_Boolean MeshVS_PrsBuilder::IsExcludingOn ( ) const

Read excluding state.

◆ SetDataSource()

void MeshVS_PrsBuilder::SetDataSource ( const Handle< MeshVS_DataSource > &  newDS)

Change custom data source.

◆ SetDrawer()

void MeshVS_PrsBuilder::SetDrawer ( const Handle< MeshVS_Drawer > &  newDr)

Change custom drawer.

◆ SetExcluding()

void MeshVS_PrsBuilder::SetExcluding ( const Standard_Boolean  state)

Set excluding state. If it is Standard_True, the nodes or elements, processed by current builder will be noted and next builder won't process its.

◆ SetPresentationManager()

void MeshVS_PrsBuilder::SetPresentationManager ( const Handle< PrsMgr_PresentationManager3d > &  thePrsMgr)

Set presentation manager for builder.

◆ TestFlags()

virtual Standard_Boolean MeshVS_PrsBuilder::TestFlags ( const Standard_Integer  DisplayMode) const
virtual

Test whether display mode has flags assigned with this builder. This method has default implementation and can be redefined for advance behavior Returns Standard_True only if display mode is appropriate for this builder.

Field Documentation

◆ myParentMesh

MeshVS_MeshPtr MeshVS_PrsBuilder::myParentMesh
protected

The documentation for this class was generated from the following file: