# Visualization
TKMeshVS
MeshVS

# MeshVS_MeshPrsBuilder Class Reference

This class provides methods to compute base mesh presentation
.

`#include <MeshVS_MeshPrsBuilder.hxx>`

Inheritance diagram for MeshVS_MeshPrsBuilder:

[legend]

## Public Member Functions

Standard_EXPORT | 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 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
| Builds base mesh presentation by calling the methods below .
virtual Standard_EXPORT void | BuildNodes (const Handle(Prs3d_Presentation)&Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
| Builds nodes presentation .
virtual Standard_EXPORT void | BuildElements (const Handle(Prs3d_Presentation)&Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Integer DisplayMode) const
| Builds elements presentation .
virtual Standard_EXPORT void | BuildHilightPrs (const Handle(Prs3d_Presentation)&Prs, const TColStd_PackedMapOfInteger &IDs, const Standard_Boolean IsElement) const
| Builds presentation of hilighted entity .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

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

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

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

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

## Member Function Documentation

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

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

Standard_EXPORT void MeshVS_MeshPrsBuilder::AddLinkPrs | ( | const TColStd_Array1OfReal & | theCoords,
|  | const Handle(Graphic3d_ArrayOfPolylines)& | theLines,
|  | const Standard_Boolean | IsShrinked,
|  | const Standard_Real | ShrinkCoef
| ) | const`[protected]`

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

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

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

virtual Standard_EXPORT void MeshVS_MeshPrsBuilder::BuildHilightPrs | ( | const Handle(Prs3d_Presentation)& | Prs,
|  | const TColStd_PackedMapOfInteger & | IDs,
|  | const Standard_Boolean | IsElement
| ) | const`[virtual]`

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

static Standard_EXPORT void MeshVS_MeshPrsBuilder::CalculateCenter | ( | const TColStd_Array1OfReal & | theCoords,
|  | const Standard_Integer | NbNodes,
|  | Standard_Real & | xG,
|  | Standard_Real & | yG,
|  | Standard_Real & | zG
| ) | `[static, protected]`

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

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

| Reimplemented from MeshVS_PrsBuilder.

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

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

- MeshVS_MeshPrsBuilder.hxx