# Visualization
TKMeshVS
MeshVS

# MeshVS_PrsBuilder Class Reference

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

`#include <MeshVS_PrsBuilder.hxx>`

Inheritance diagram for MeshVS_PrsBuilder:

[legend]

## Public Member Functions

virtual Standard_EXPORT 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)
.

virtual Standard_EXPORT 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) .
virtual Standard_EXPORT Handle_SelectBasics_SensitiveEntity | CustomSensitiveEntity (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 ) .
Standard_EXPORT Standard_Integer | GetFlags () const
| Returns flags, assigned with builder during creation .
virtual Standard_EXPORT 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 .
Standard_EXPORT Standard_Integer | GetId () const
| Returns builder ID .
Standard_EXPORT Standard_Integer | GetPriority () const
| Returns priority; as priority bigger, as soon builder will be called. .
Standard_EXPORT Handle_MeshVS_DataSource | GetDataSource () const
| Returns custom data source or default ( from MeshVS_Mesh ) if custom is NULL .
Standard_EXPORT void | SetDataSource (const Handle(MeshVS_DataSource)&newDS)
| Change custom data source .
Standard_EXPORT Handle_MeshVS_Drawer | GetDrawer () const
| Returns custom drawer or default ( from MeshVS_Mesh ) if custom is NULL .
Standard_EXPORT void | SetDrawer (const Handle(MeshVS_Drawer)&newDr)
| Change custom drawer .
Standard_EXPORT 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. .
Standard_EXPORT Standard_Boolean | IsExcludingOn () const
| Read excluding state .
Standard_EXPORT void | SetPresentationManager (const Handle(PrsMgr_PresentationManager3d)&thePrsMgr)
| Set presentation manager for builder .
Standard_EXPORT Handle_PrsMgr_PresentationManager3d | GetPresentationManager () const
| Get presentation manager of builder .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

Standard_EXPORT | 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
.

Standard_EXPORT Handle_MeshVS_DataSource | DataSource () const
| Returns only custom data source .
Standard_EXPORT Handle_MeshVS_Drawer | Drawer () const
| Returns only custom drawer .

## Protected Attributes

MeshVS_MeshPtr | myParentMesh

## Private Attributes

Standard_Boolean | myIsExcluding
Handle_MeshVS_DataSource | myDataSource
Handle_MeshVS_Drawer | myDrawer
Standard_Integer | myFlags
Standard_Integer | myId
Standard_Integer | myPriority
Handle_PrsMgr_PresentationManager3d | myPrsMgr

## Constructor & Destructor Documentation

Standard_EXPORT 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]`

## Member Function Documentation

virtual Standard_EXPORT 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]`

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

virtual Standard_EXPORT void MeshVS_PrsBuilder::CustomBuild | ( | const Handle(Prs3d_Presentation)& | Prs,
|  | const TColStd_PackedMapOfInteger & | IDs,
|  | TColStd_PackedMapOfInteger & | IDsToExclude,
|  | const Standard_Integer | DisplayMode
| ) | const`[virtual]`

virtual Standard_EXPORT Handle_SelectBasics_SensitiveEntity MeshVS_PrsBuilder::CustomSensitiveEntity | ( | const Handle(SelectBasics_EntityOwner)& | Owner,
|  | const Standard_Integer | SelectMode
| ) | const`[virtual]`

Standard_EXPORT Handle_MeshVS_DataSource MeshVS_PrsBuilder::DataSource | ( |  | ) | const`[protected]`

Standard_EXPORT Handle_MeshVS_Drawer MeshVS_PrsBuilder::Drawer | ( |  | ) | const`[protected]`

Standard_EXPORT Handle_MeshVS_DataSource MeshVS_PrsBuilder::GetDataSource | ( |  | ) | const

Standard_EXPORT Handle_MeshVS_Drawer MeshVS_PrsBuilder::GetDrawer | ( |  | ) | const

Standard_EXPORT Standard_Integer MeshVS_PrsBuilder::GetFlags | ( |  | ) | const

Standard_EXPORT Standard_Integer MeshVS_PrsBuilder::GetId | ( |  | ) | const

Standard_EXPORT Handle_PrsMgr_PresentationManager3d MeshVS_PrsBuilder::GetPresentationManager | ( |  | ) | const

Standard_EXPORT Standard_Integer MeshVS_PrsBuilder::GetPriority | ( |  | ) | const

Standard_EXPORT const MeshVS_PrsBuilder::Handle | ( | Standard_Type |  | ) | const

| Reimplemented in MeshVS_ElementalColorPrsBuilder, MeshVS_MeshPrsBuilder, MeshVS_NodalColorPrsBuilder, MeshVS_TextPrsBuilder, and MeshVS_VectorPrsBuilder.

Standard_EXPORT Standard_Boolean MeshVS_PrsBuilder::IsExcludingOn | ( |  | ) | const

Standard_EXPORT void MeshVS_PrsBuilder::SetDataSource | ( | const Handle(MeshVS_DataSource)& | newDS | ) |

Standard_EXPORT void MeshVS_PrsBuilder::SetDrawer | ( | const Handle(MeshVS_Drawer)& | newDr | ) |

Standard_EXPORT void MeshVS_PrsBuilder::SetExcluding | ( | const Standard_Boolean | state | ) |

Standard_EXPORT void MeshVS_PrsBuilder::SetPresentationManager | ( | const Handle(PrsMgr_PresentationManager3d)& | thePrsMgr | ) |

virtual Standard_EXPORT Standard_Boolean MeshVS_PrsBuilder::TestFlags | ( | const Standard_Integer | DisplayMode | ) | const`[virtual]`

## Field Documentation

Handle_MeshVS_DataSource MeshVS_PrsBuilder::myDataSource `[private]`

Handle_MeshVS_Drawer MeshVS_PrsBuilder::myDrawer `[private]`

Standard_Integer MeshVS_PrsBuilder::myFlags `[private]`

Standard_Integer MeshVS_PrsBuilder::myId `[private]`

Standard_Boolean MeshVS_PrsBuilder::myIsExcluding `[private]`

MeshVS_MeshPtr MeshVS_PrsBuilder::myParentMesh `[protected]`

Standard_Integer MeshVS_PrsBuilder::myPriority `[private]`

Handle_PrsMgr_PresentationManager3d MeshVS_PrsBuilder::myPrsMgr `[private]`

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

- MeshVS_PrsBuilder.hxx