![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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. More...
#include <MeshVS_VectorPrsBuilder.hxx>

Public Member Functions | |
| MeshVS_VectorPrsBuilder (const occ::handle< MeshVS_Mesh > &Parent, const double MaxLength, const Quantity_Color &VectorColor, const MeshVS_DisplayModeFlags &Flags=MeshVS_DMF_VectorDataPrs, const occ::handle< MeshVS_DataSource > &DS=nullptr, const int Id=-1, const MeshVS_BuilderPriority &Priority=MeshVS_BP_Vector, const bool IsSimplePrs=false) | |
| void | Build (const occ::handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const bool IsElement, const int theDisplayMode) const override |
| Builds vector data presentation. | |
| void | DrawVector (const gp_Trsf &theTrsf, const double Length, const double MaxLength, const NCollection_Array1< gp_Pnt > &ArrowPoints, const occ::handle< Graphic3d_ArrayOfPrimitives > &Lines, const occ::handle< Graphic3d_ArrayOfPrimitives > &ArrowLines, const occ::handle< Graphic3d_ArrayOfPrimitives > &Triangles) const |
| Adds to array of polygons and polylines some primitive representing single vector. | |
| const NCollection_DataMap< int, gp_Vec > & | GetVectors (const bool IsElement) const |
| Returns map of vectors assigned with nodes or elements. | |
| void | SetVectors (const bool IsElement, const NCollection_DataMap< int, gp_Vec > &Map) |
| Sets map of vectors assigned with nodes or elements. | |
| bool | HasVectors (const bool IsElement) const |
| Returns true, if map isn't empty. | |
| bool | GetVector (const bool IsElement, const int ID, gp_Vec &Vect) const |
| Returns vector assigned with certain node or element. | |
| void | SetVector (const bool IsElement, const int ID, const gp_Vec &Vect) |
| Sets vector assigned with certain node or element. | |
| void | GetMinMaxVectorValue (const bool IsElement, double &MinValue, double &MaxValue) const |
| Calculates minimal and maximal length of vectors in map ( nodal, if IsElement = False or elemental, if IsElement = True ) | |
| void | SetSimplePrsMode (const bool IsSimpleArrow) |
| Sets flag that indicates is simple vector arrow mode uses or not default value is False. | |
| void | SetSimplePrsParams (const double theLineWidthParam, const double theStartParam, const double 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. | |
Public Member Functions inherited from MeshVS_PrsBuilder | |
| virtual void | CustomBuild (const occ::handle< Prs3d_Presentation > &Prs, const TColStd_PackedMapOfInteger &IDs, TColStd_PackedMapOfInteger &IDsToExclude, const int DisplayMode) const |
| This method is called to build presentation of custom elements (they have MeshVS_ET_0D type). 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) | |
| virtual occ::handle< Select3D_SensitiveEntity > | CustomSensitiveEntity (const occ::handle< SelectMgr_EntityOwner > &Owner, const int SelectMode) const |
| This method is called to build sensitive of custom elements ( they have MeshVS_ET_0D type ) | |
| int | GetFlags () const |
| Returns flags, assigned with builder during creation. | |
| virtual bool | TestFlags (const int DisplayMode) const |
| Test whether display mode has flags assigned with this builder. This method has default implementation and can be redefined for advance behavior Returns true only if display mode is appropriate for this builder. | |
| int | GetId () const |
| Returns builder ID. | |
| int | GetPriority () const |
| Returns priority; as priority bigger, as soon builder will be called. | |
| occ::handle< MeshVS_DataSource > | GetDataSource () const |
| Returns custom data source or default ( from MeshVS_Mesh ) if custom is NULL. | |
| void | SetDataSource (const occ::handle< MeshVS_DataSource > &newDS) |
| Change custom data source. | |
| occ::handle< MeshVS_Drawer > | GetDrawer () const |
| Returns custom drawer or default ( from MeshVS_Mesh ) if custom is NULL. | |
| void | SetDrawer (const occ::handle< MeshVS_Drawer > &newDr) |
| Change custom drawer. | |
| void | SetExcluding (const bool state) |
| Set excluding state. If it is true, the nodes or elements, processed by current builder will be noted and next builder won't process its. | |
| bool | IsExcludingOn () const |
| Read excluding state. | |
| void | SetPresentationManager (const occ::handle< PrsMgr_PresentationManager > &thePrsMgr) |
| Set presentation manager for builder. | |
| occ::handle< PrsMgr_PresentationManager > | GetPresentationManager () const |
| Get presentation manager of builder. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | IsKind (const opencascade::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. | |
| bool | IsKind (const char *const 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. | |
| Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Static Public Member Functions | |
| static double | calculateArrow (NCollection_Array1< gp_Pnt > &Points, const double Length, const double ArrowPart) |
| Calculates points of arrow presentation. | |
Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
Protected Member Functions inherited from MeshVS_PrsBuilder | |
| MeshVS_PrsBuilder (const occ::handle< MeshVS_Mesh > &Parent, const MeshVS_DisplayModeFlags &Flags, const occ::handle< MeshVS_DataSource > &DS, const int Id, const MeshVS_BuilderPriority &Priority=MeshVS_BP_Default) | |
| Constructor 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. | |
| occ::handle< MeshVS_DataSource > | DataSource () const |
| Returns only custom data source. | |
| occ::handle< MeshVS_Drawer > | Drawer () const |
| Returns only custom drawer. | |
Protected Attributes inherited from MeshVS_PrsBuilder | |
| MeshVS_MeshPtr | myParentMesh |
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.
| MeshVS_VectorPrsBuilder::MeshVS_VectorPrsBuilder | ( | const occ::handle< MeshVS_Mesh > & | Parent, |
| const double | MaxLength, | ||
| const Quantity_Color & | VectorColor, | ||
| const MeshVS_DisplayModeFlags & | Flags = MeshVS_DMF_VectorDataPrs, | ||
| const occ::handle< MeshVS_DataSource > & | DS = nullptr, | ||
| const int | Id = -1, | ||
| const MeshVS_BuilderPriority & | Priority = MeshVS_BP_Vector, | ||
| const bool | IsSimplePrs = false ) |
|
overridevirtual |
Builds vector data presentation.
Implements MeshVS_PrsBuilder.
|
static |
Calculates points of arrow presentation.
| void MeshVS_VectorPrsBuilder::DrawVector | ( | const gp_Trsf & | theTrsf, |
| const double | Length, | ||
| const double | MaxLength, | ||
| const NCollection_Array1< gp_Pnt > & | ArrowPoints, | ||
| const occ::handle< Graphic3d_ArrayOfPrimitives > & | Lines, | ||
| const occ::handle< Graphic3d_ArrayOfPrimitives > & | ArrowLines, | ||
| const occ::handle< Graphic3d_ArrayOfPrimitives > & | Triangles ) const |
Adds to array of polygons and polylines some primitive representing single vector.
| void MeshVS_VectorPrsBuilder::GetMinMaxVectorValue | ( | const bool | IsElement, |
| double & | MinValue, | ||
| double & | MaxValue ) const |
Calculates minimal and maximal length of vectors in map ( nodal, if IsElement = False or elemental, if IsElement = True )
Returns vector assigned with certain node or element.
| const NCollection_DataMap< int, gp_Vec > & MeshVS_VectorPrsBuilder::GetVectors | ( | const bool | IsElement | ) | const |
Returns map of vectors assigned with nodes or elements.
Returns true, if map isn't empty.
Sets flag that indicates is simple vector arrow mode uses or not default value is False.
| void MeshVS_VectorPrsBuilder::SetSimplePrsParams | ( | const double | theLineWidthParam, |
| const double | theStartParam, | ||
| const double | 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.
Sets vector assigned with certain node or element.
| void MeshVS_VectorPrsBuilder::SetVectors | ( | const bool | IsElement, |
| const NCollection_DataMap< int, gp_Vec > & | Map ) |
Sets map of vectors assigned with nodes or elements.