File indexing completed on 2025-01-18 10:04:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _MeshVS_VectorPrsBuilder_HeaderFile
0017 #define _MeshVS_VectorPrsBuilder_HeaderFile
0018
0019 #include <MeshVS_DataMapOfIntegerVector.hxx>
0020 #include <MeshVS_PrsBuilder.hxx>
0021 #include <MeshVS_DisplayModeFlags.hxx>
0022 #include <MeshVS_BuilderPriority.hxx>
0023 #include <TColgp_Array1OfPnt.hxx>
0024
0025 class MeshVS_Mesh;
0026 class Quantity_Color;
0027 class MeshVS_DataSource;
0028 class gp_Trsf;
0029 class Graphic3d_ArrayOfPrimitives;
0030 class gp_Vec;
0031
0032 DEFINE_STANDARD_HANDLE(MeshVS_VectorPrsBuilder, MeshVS_PrsBuilder)
0033
0034
0035
0036
0037 class MeshVS_VectorPrsBuilder : public MeshVS_PrsBuilder
0038 {
0039
0040 public:
0041
0042
0043 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);
0044
0045
0046 Standard_EXPORT virtual void Build (const Handle(Prs3d_Presentation)& Prs, const TColStd_PackedMapOfInteger& IDs, TColStd_PackedMapOfInteger& IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer theDisplayMode) const Standard_OVERRIDE;
0047
0048
0049 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;
0050
0051
0052 Standard_EXPORT static Standard_Real calculateArrow (TColgp_Array1OfPnt& Points, const Standard_Real Length, const Standard_Real ArrowPart);
0053
0054
0055 Standard_EXPORT const MeshVS_DataMapOfIntegerVector& GetVectors (const Standard_Boolean IsElement) const;
0056
0057
0058 Standard_EXPORT void SetVectors (const Standard_Boolean IsElement, const MeshVS_DataMapOfIntegerVector& Map);
0059
0060
0061 Standard_EXPORT Standard_Boolean HasVectors (const Standard_Boolean IsElement) const;
0062
0063
0064 Standard_EXPORT Standard_Boolean GetVector (const Standard_Boolean IsElement, const Standard_Integer ID, gp_Vec& Vect) const;
0065
0066
0067 Standard_EXPORT void SetVector (const Standard_Boolean IsElement, const Standard_Integer ID, const gp_Vec& Vect);
0068
0069
0070
0071 Standard_EXPORT void GetMinMaxVectorValue (const Standard_Boolean IsElement, Standard_Real& MinValue, Standard_Real& MaxValue) const;
0072
0073
0074
0075 Standard_EXPORT void SetSimplePrsMode (const Standard_Boolean IsSimpleArrow);
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 Standard_EXPORT void SetSimplePrsParams (const Standard_Real theLineWidthParam, const Standard_Real theStartParam, const Standard_Real theEndParam);
0086
0087
0088
0089
0090 DEFINE_STANDARD_RTTIEXT(MeshVS_VectorPrsBuilder,MeshVS_PrsBuilder)
0091
0092 protected:
0093
0094
0095
0096
0097 private:
0098
0099
0100 Standard_Boolean myIsSimplePrs;
0101 Standard_Real mySimpleWidthPrm;
0102 Standard_Real mySimpleStartPrm;
0103 Standard_Real mySimpleEndPrm;
0104 MeshVS_DataMapOfIntegerVector myNodeVectorMap;
0105 MeshVS_DataMapOfIntegerVector myElemVectorMap;
0106
0107
0108 };
0109
0110
0111
0112
0113
0114
0115
0116 #endif