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
MeshVS_VectorPrsBuilder Class Reference

This class provides methods to create vector data presentation.
It store map of vectors assigned with nodes or elements.
In simplified mode vectors draws with thickened ends instead of arrows

#include <MeshVS_VectorPrsBuilder.hxx>

Inheritance diagram for MeshVS_VectorPrsBuilder:
Inheritance graph
[legend]

Public Member Functions

 MeshVS_VectorPrsBuilder (const Handle< MeshVS_Mesh > &Parent, const Standard_Real MaxLength, const Quantity_Color &VectorColor, const MeshVS_DisplayModeFlags &Flags=MeshVS_DMF_VectorDataPrs, const Handle< MeshVS_DataSource > &DS=0, const Standard_Integer Id=-1, const MeshVS_BuilderPriority &Priority=MeshVS_BP_Vector, const Standard_Boolean IsSimplePrs=Standard_False)
virtual void Build (const Handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer theDisplayMode) const
 Builds vector data presentation

void DrawVector (const gp_Trsf &theTrsf, const Standard_Real Length, const Standard_Real MaxLength, const TColgp_Array1OfPnt &ArrowPoints, const Handle< Graphic3d_ArrayOfPrimitives > &Lines, const Handle< Graphic3d_ArrayOfPrimitives > &ArrowLines, const Handle< Graphic3d_ArrayOfPrimitives > &Triangles) const
 Adds to array of polygons and polylines some primitive representing single vector

const
MeshVS_DataMapOfIntegerVector
GetVectors (const Standard_Boolean IsElement) const
 Returns map of vectors assigned with nodes or elements

void SetVectors (const Standard_Boolean IsElement, const MeshVS_DataMapOfIntegerVector &Map)
 Sets map of vectors assigned with nodes or elements

Standard_Boolean HasVectors (const Standard_Boolean IsElement) const
 Returns true, if map isn't empty

Standard_Boolean GetVector (const Standard_Boolean IsElement, const Standard_Integer ID, gp_Vec &Vect) const
 Returns vector assigned with certain node or element

void SetVector (const Standard_Boolean IsElement, const Standard_Integer ID, const gp_Vec &Vect)
 Sets vector assigned with certain node or element

void GetMinMaxVectorValue (const Standard_Boolean IsElement, Standard_Real &MinValue, Standard_Real &MaxValue) const
 Calculates minimal and maximal length of vectors in map
( nodal, if IsElement = False or elemental, if IsElement = True )

void SetSimplePrsMode (const Standard_Boolean IsSimpleArrow)
 Sets flag that indicates is simple vector arrow mode uses or not
default value is False

void SetSimplePrsParams (const Standard_Real theLineWidthParam, const Standard_Real theStartParam, const Standard_Real theEndParam)
 Sets parameters of simple vector arrwo presentation
theLineWidthParam - coefficient of vector line width (to draw line instead of arrow)
theStartParam and theEndParam parameters of start and end of thickened ends
position of thickening calculates according to parameters and maximum vector length
default values are:
theLineWidthParam = 2.5
theStartParam = 0.85
theEndParam = 0.95

Static Public Member Functions

static Standard_Real calculateArrow (TColgp_Array1OfPnt &Points, const Standard_Real Length, const Standard_Real ArrowPart)
 Calculates points of arrow presentation


Constructor & Destructor Documentation


Member Function Documentation

virtual void MeshVS_VectorPrsBuilder::Build ( const Handle< Prs3d_Presentation > &  Prs,
const TColStd_PackedMapOfInteger IDs,
TColStd_PackedMapOfInteger IDsToExclude,
const Standard_Boolean  IsElement,
const Standard_Integer  theDisplayMode 
) const [virtual]

Implements MeshVS_PrsBuilder.


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