Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
MeshVS_MeshPrsBuilder Class Reference

This class provides methods to compute base mesh presentation
More...

#include <MeshVS_MeshPrsBuilder.hxx>

Inheritance diagram for MeshVS_MeshPrsBuilder:
Inheritance graph
[legend]

Public Member Functions

 MeshVS_MeshPrsBuilder (const Handle< MeshVS_Mesh > &Parent, const MeshVS_DisplayModeFlags &Flags=MeshVS_DMF_OCCMask, const Handle< MeshVS_DataSource > &DS=0, const Standard_Integer Id=-1, const MeshVS_BuilderPriority &Priority=MeshVS_BP_Mesh)
 Creates builder with certain display mode flags, data source, ID and priority
More...
 
virtual void Build (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer DisplayMode) const
 Builds base mesh presentation by calling the methods below
More...
 
virtual void BuildNodes (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
 Builds nodes presentation
More...
 
virtual void BuildElements (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
 Builds elements presentation
More...
 
virtual void BuildHilightPrs (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, const Standard_Boolean IsElement) const
 Builds presentation of hilighted entity
More...
 
- Public Member Functions inherited from MeshVS_PrsBuilder
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). <br>

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_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 )
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. <br>

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_DataSource GetDataSource () 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_Drawer GetDrawer () 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 <br>

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_PresentationManager3d GetPresentationManager () const
 Get presentation manager of builder
More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. 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 ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const 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 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...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Static Public Member Functions

static void AddVolumePrs (const Handle< MeshVS_HArray1OfSequenceOfInteger > &Topo, const TColStd_Array1OfReal &Nodes, const Standard_Integer NbNodes, const Handle< Graphic3d_ArrayOfPrimitives > &Array, const Standard_Boolean IsReflected, const Standard_Boolean IsShrinked, const Standard_Boolean IsSelect, const Standard_Real ShrinkCoef)
 Add to array polygons or polylines representing volume
More...
 
static void HowManyPrimitives (const Handle< MeshVS_HArray1OfSequenceOfInteger > &Topo, const Standard_Boolean AsPolygons, const Standard_Boolean IsSelect, const Standard_Integer NbNodes, Standard_Integer &Vertices, Standard_Integer &Bounds)
 Calculate how many polygons or polylines are necessary to draw passed topology
More...
 

Protected Member Functions

void AddLinkPrs (const TColStd_Array1OfReal &theCoords, const Handle< Graphic3d_ArrayOfPolylines > &theLines, const Standard_Boolean IsShrinked, const Standard_Real ShrinkCoef) const
 Add to array of polylines some lines representing link
More...
 
void AddFaceWirePrs (const TColStd_Array1OfReal &theCoords, const Standard_Integer NbNodes, const Handle< Graphic3d_ArrayOfPolylines > &theLines, const Standard_Boolean IsShrinked, const Standard_Real ShrinkCoef) const
 Add to array of polylines some lines representing face's wire
More...
 
void AddFaceSolidPrs (const Standard_Integer ID, const TColStd_Array1OfReal &theCoords, const Standard_Integer NbNodes, const Standard_Integer MaxNodes, const Handle< Graphic3d_ArrayOfPolygons > &thePolygons, const Standard_Boolean IsReflected, const Standard_Boolean IsShrinked, const Standard_Real ShrinkCoef, const Standard_Boolean IsMeshSmoothShading) const
 Add to array of polygons a polygon representing face
More...
 
void DrawArrays (const Handle< Prs3d_Presentation > &Prs, const Handle< Graphic3d_ArrayOfPolygons > &thePolygons, const Handle< Graphic3d_ArrayOfPolylines > &theLines, const Handle< Graphic3d_ArrayOfPolylines > &theLinkLines, const Handle< Graphic3d_ArrayOfPolygons > &theVolumesInShad, const Standard_Boolean IsPolygonsEdgesOff, const Standard_Boolean IsSelected, const Handle< Graphic3d_AspectFillArea3d > &theFillAsp, const Handle< Graphic3d_AspectLine3d > &theLineAsp) const
 Draw array of polygons and polylines in the certain order according to transparency
More...
 
- Protected Member Functions inherited from 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)
 
 Constructor <br>

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_DataSource DataSource () const
 Returns only custom data source
More...
 
Handle_MeshVS_Drawer Drawer () const
 Returns only custom drawer
More...
 

Static Protected Member Functions

static void CalculateCenter (const TColStd_Array1OfReal &theCoords, const Standard_Integer NbNodes, Standard_Real &xG, Standard_Real &yG, Standard_Real &zG)
 
 Default calculation of center of face or link. This method if useful for shrink mode presentation <br>

theCoords is array of nodes co-ordinates in the strict order X1, Y1, Z1, X2...
NbNodes is number of nodes an element consist of
xG, yG, zG are co-ordinates of center whose will be returned
More...

 

Additional Inherited Members

- Protected Attributes inherited from MeshVS_PrsBuilder
MeshVS_MeshPtr myParentMesh
 

Detailed Description

This class provides methods to compute base mesh presentation

Constructor & Destructor Documentation

MeshVS_MeshPrsBuilder::MeshVS_MeshPrsBuilder ( const Handle< MeshVS_Mesh > &  Parent,
const MeshVS_DisplayModeFlags Flags = MeshVS_DMF_OCCMask,
const Handle< MeshVS_DataSource > &  DS = 0,
const Standard_Integer  Id = -1,
const MeshVS_BuilderPriority Priority = MeshVS_BP_Mesh 
)

Creates builder with certain display mode flags, data source, ID and priority

Member Function Documentation

void MeshVS_MeshPrsBuilder::AddFaceSolidPrs ( const Standard_Integer  ID,
const TColStd_Array1OfReal theCoords,
const Standard_Integer  NbNodes,
const Standard_Integer  MaxNodes,
const Handle< Graphic3d_ArrayOfPolygons > &  thePolygons,
const Standard_Boolean  IsReflected,
const Standard_Boolean  IsShrinked,
const Standard_Real  ShrinkCoef,
const Standard_Boolean  IsMeshSmoothShading 
) const
protected

Add to array of polygons a polygon representing face

void MeshVS_MeshPrsBuilder::AddFaceWirePrs ( const TColStd_Array1OfReal theCoords,
const Standard_Integer  NbNodes,
const Handle< Graphic3d_ArrayOfPolylines > &  theLines,
const Standard_Boolean  IsShrinked,
const Standard_Real  ShrinkCoef 
) const
protected

Add to array of polylines some lines representing face's wire

void MeshVS_MeshPrsBuilder::AddLinkPrs ( const TColStd_Array1OfReal theCoords,
const Handle< Graphic3d_ArrayOfPolylines > &  theLines,
const Standard_Boolean  IsShrinked,
const Standard_Real  ShrinkCoef 
) const
protected

Add to array of polylines some lines representing link

static void MeshVS_MeshPrsBuilder::AddVolumePrs ( const Handle< MeshVS_HArray1OfSequenceOfInteger > &  Topo,
const TColStd_Array1OfReal Nodes,
const Standard_Integer  NbNodes,
const Handle< Graphic3d_ArrayOfPrimitives > &  Array,
const Standard_Boolean  IsReflected,
const Standard_Boolean  IsShrinked,
const Standard_Boolean  IsSelect,
const Standard_Real  ShrinkCoef 
)
static

Add to array polygons or polylines representing volume

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

Builds base mesh presentation by calling the methods below

Implements MeshVS_PrsBuilder.

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

Builds elements presentation

virtual void MeshVS_MeshPrsBuilder::BuildHilightPrs ( const Handle< Prs3d_Presentation > &  Prs,
const TColStd_PackedMapOfInteger IDs,
const Standard_Boolean  IsElement 
) const
virtual

Builds presentation of hilighted entity

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

Builds nodes presentation

static void MeshVS_MeshPrsBuilder::CalculateCenter ( const TColStd_Array1OfReal theCoords,
const Standard_Integer  NbNodes,
Standard_Real xG,
Standard_Real yG,
Standard_Real zG 
)
staticprotected

 Default calculation of center of face or link. This method if useful for shrink mode presentation <br>

theCoords is array of nodes co-ordinates in the strict order X1, Y1, Z1, X2...
NbNodes is number of nodes an element consist of
xG, yG, zG are co-ordinates of center whose will be returned

void MeshVS_MeshPrsBuilder::DrawArrays ( const Handle< Prs3d_Presentation > &  Prs,
const Handle< Graphic3d_ArrayOfPolygons > &  thePolygons,
const Handle< Graphic3d_ArrayOfPolylines > &  theLines,
const Handle< Graphic3d_ArrayOfPolylines > &  theLinkLines,
const Handle< Graphic3d_ArrayOfPolygons > &  theVolumesInShad,
const Standard_Boolean  IsPolygonsEdgesOff,
const Standard_Boolean  IsSelected,
const Handle< Graphic3d_AspectFillArea3d > &  theFillAsp,
const Handle< Graphic3d_AspectLine3d > &  theLineAsp 
) const
protected

Draw array of polygons and polylines in the certain order according to transparency

static void MeshVS_MeshPrsBuilder::HowManyPrimitives ( const Handle< MeshVS_HArray1OfSequenceOfInteger > &  Topo,
const Standard_Boolean  AsPolygons,
const Standard_Boolean  IsSelect,
const Standard_Integer  NbNodes,
Standard_Integer Vertices,
Standard_Integer Bounds 
)
static

Calculate how many polygons or polylines are necessary to draw passed topology


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