# Visualization
TKMeshVS
MeshVS

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

[legend]

## Public Member Functions

Standard_EXPORT | 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 Standard_EXPORT 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 .
Standard_EXPORT 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 .
Standard_EXPORT const MeshVS_DataMapOfIntegerVector & | GetVectors (const Standard_Boolean IsElement) const
| Returns map of vectors assigned with nodes or elements .
Standard_EXPORT void | SetVectors (const Standard_Boolean IsElement, const MeshVS_DataMapOfIntegerVector &Map)
| Sets map of vectors assigned with nodes or elements .
Standard_EXPORT Standard_Boolean | HasVectors (const Standard_Boolean IsElement) const
| Returns true, if map isn't empty .
Standard_EXPORT Standard_Boolean | GetVector (const Standard_Boolean IsElement, const Standard_Integer ID, gp_Vec &Vect) const
| Returns vector assigned with certain node or element .
Standard_EXPORT void | SetVector (const Standard_Boolean IsElement, const Standard_Integer ID, const gp_Vec &Vect)
| Sets vector assigned with certain node or element .
Standard_EXPORT 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 ) .
Standard_EXPORT void | SetSimplePrsMode (const Standard_Boolean IsSimpleArrow)
| Sets flag that indicates is simple vector arrow mode uses or not default value is False .
Standard_EXPORT 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 .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

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

## Private Attributes

Standard_Boolean | myIsSimplePrs
Standard_Real | mySimpleWidthPrm
Standard_Real | mySimpleStartPrm
Standard_Real | mySimpleEndPrm
MeshVS_DataMapOfIntegerVector | myNodeVectorMap
MeshVS_DataMapOfIntegerVector | myElemVectorMap

## Constructor & Destructor Documentation

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

## Member Function Documentation

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

static Standard_EXPORT Standard_Real MeshVS_VectorPrsBuilder::calculateArrow | ( | TColgp_Array1OfPnt & | Points,
|  | const Standard_Real | Length,
|  | const Standard_Real | ArrowPart
| ) | `[static]`

Standard_EXPORT void MeshVS_VectorPrsBuilder::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

Standard_EXPORT void MeshVS_VectorPrsBuilder::GetMinMaxVectorValue | ( | const Standard_Boolean | IsElement,
|  | Standard_Real & | MinValue,
|  | Standard_Real & | MaxValue
| ) | const

Standard_EXPORT Standard_Boolean MeshVS_VectorPrsBuilder::GetVector | ( | const Standard_Boolean | IsElement,
|  | const Standard_Integer | ID,
|  | gp_Vec & | Vect
| ) | const

Standard_EXPORT const MeshVS_DataMapOfIntegerVector& MeshVS_VectorPrsBuilder::GetVectors | ( | const Standard_Boolean | IsElement | ) | const

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

| Reimplemented from MeshVS_PrsBuilder.

Standard_EXPORT Standard_Boolean MeshVS_VectorPrsBuilder::HasVectors | ( | const Standard_Boolean | IsElement | ) | const

Standard_EXPORT void MeshVS_VectorPrsBuilder::SetSimplePrsMode | ( | const Standard_Boolean | IsSimpleArrow | ) |

Standard_EXPORT void MeshVS_VectorPrsBuilder::SetSimplePrsParams | ( | const Standard_Real | theLineWidthParam,
|  | const Standard_Real | theStartParam,
|  | const Standard_Real | theEndParam
| ) |

Standard_EXPORT void MeshVS_VectorPrsBuilder::SetVector | ( | const Standard_Boolean | IsElement,
|  | const Standard_Integer | ID,
|  | const gp_Vec & | Vect
| ) |

Standard_EXPORT void MeshVS_VectorPrsBuilder::SetVectors | ( | const Standard_Boolean | IsElement,
|  | const MeshVS_DataMapOfIntegerVector & | Map
| ) |

## Field Documentation

MeshVS_DataMapOfIntegerVector MeshVS_VectorPrsBuilder::myElemVectorMap `[private]`

Standard_Boolean MeshVS_VectorPrsBuilder::myIsSimplePrs `[private]`

MeshVS_DataMapOfIntegerVector MeshVS_VectorPrsBuilder::myNodeVectorMap `[private]`

Standard_Real MeshVS_VectorPrsBuilder::mySimpleEndPrm `[private]`

Standard_Real MeshVS_VectorPrsBuilder::mySimpleStartPrm `[private]`

Standard_Real MeshVS_VectorPrsBuilder::mySimpleWidthPrm `[private]`

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

- MeshVS_VectorPrsBuilder.hxx