Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
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

#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

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

virtual void BuildNodes (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
 Builds nodes presentation

virtual void BuildElements (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
 Builds elements presentation

virtual void BuildHilightPrs (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, const Standard_Boolean IsElement) const
 Builds presentation of hilighted entity

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

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

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

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

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

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

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


Constructor & Destructor Documentation


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]
void MeshVS_MeshPrsBuilder::AddLinkPrs ( const TColStd_Array1OfReal theCoords,
const Handle< Graphic3d_ArrayOfPolylines > &  theLines,
const Standard_Boolean  IsShrinked,
const Standard_Real  ShrinkCoef 
) const [protected]
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]

Implements MeshVS_PrsBuilder.

static void MeshVS_MeshPrsBuilder::CalculateCenter ( const TColStd_Array1OfReal theCoords,
const Standard_Integer  NbNodes,
Standard_Real xG,
Standard_Real yG,
Standard_Real zG 
) [static, protected]
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]

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