File indexing completed on 2026-11-24 10:31:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _XSDRAWSTL_DataSource_HeaderFile
0017 #define _XSDRAWSTL_DataSource_HeaderFile
0018
0019 #include <Standard.hxx>
0020
0021 #include <Standard_Integer.hxx>
0022 #include <NCollection_Array2.hxx>
0023 #include <NCollection_HArray2.hxx>
0024 #include <MeshVS_DataSource.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <MeshVS_EntityType.hxx>
0027 #include <Poly_Triangulation.hxx>
0028
0029
0030 class XSDRAWSTL_DataSource : public MeshVS_DataSource
0031 {
0032
0033 public:
0034
0035 Standard_EXPORT XSDRAWSTL_DataSource(const occ::handle<Poly_Triangulation>& aMesh);
0036
0037
0038
0039
0040
0041
0042 Standard_EXPORT bool GetGeom(const int ID,
0043 const bool IsElement,
0044 NCollection_Array1<double>& Coords,
0045 int& NbNodes,
0046 MeshVS_EntityType& Type) const override;
0047
0048
0049
0050 Standard_EXPORT bool GetGeomType(const int ID,
0051 const bool IsElement,
0052 MeshVS_EntityType& Type) const override;
0053
0054
0055
0056 Standard_EXPORT void* GetAddr(const int ID, const bool IsElement) const override;
0057
0058
0059 Standard_EXPORT bool GetNodesByElement(const int ID,
0060 NCollection_Array1<int>& NodeIDs,
0061 int& NbNodes) const override;
0062
0063
0064 Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllNodes() const override;
0065
0066
0067 Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllElements() const override;
0068
0069
0070
0071 Standard_EXPORT bool GetNormal(const int Id,
0072 const int Max,
0073 double& nx,
0074 double& ny,
0075 double& nz) const override;
0076
0077 DEFINE_STANDARD_RTTIEXT(XSDRAWSTL_DataSource, MeshVS_DataSource)
0078
0079 private:
0080 occ::handle<Poly_Triangulation> myMesh;
0081 TColStd_PackedMapOfInteger myNodes;
0082 TColStd_PackedMapOfInteger myElements;
0083 occ::handle<NCollection_HArray2<int>> myElemNodes;
0084 occ::handle<NCollection_HArray2<double>> myNodeCoords;
0085 occ::handle<NCollection_HArray2<double>> myElemNormals;
0086 };
0087
0088 #endif