// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _XSDRAWSTLVRML_DataSource_HeaderFile #define _XSDRAWSTLVRML_DataSource_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_XSDRAWSTLVRML_DataSource_HeaderFile #include #endif #ifndef _Handle_StlMesh_Mesh_HeaderFile #include #endif #ifndef _TColStd_PackedMapOfInteger_HeaderFile #include #endif #ifndef _Handle_TColStd_HArray2OfInteger_HeaderFile #include #endif #ifndef _Handle_TColStd_HArray2OfReal_HeaderFile #include #endif #ifndef _MeshVS_DataSource_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _MeshVS_EntityType_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif class StlMesh_Mesh; class TColStd_HArray2OfInteger; class TColStd_HArray2OfReal; class TColStd_Array1OfReal; class TColStd_Array1OfInteger; //! The sample DataSource for working with STLMesh_Mesh
class XSDRAWSTLVRML_DataSource : public MeshVS_DataSource { public: //! Constructor
Standard_EXPORT XSDRAWSTLVRML_DataSource(const Handle(StlMesh_Mesh)& aMesh); //! Returns geometry information about node ( if IsElement is False ) or element ( IsElement is True )
//! by co-ordinates. For element this method must return all its nodes co-ordinates in the strict order: X, Y, Z and
//! with nodes order is the same as in wire bounding the face or link. NbNodes is number of nodes of element.
//! It is recommended to return 1 for node. Type is an element type.
Standard_EXPORT Standard_Boolean GetGeom(const Standard_Integer ID,const Standard_Boolean IsElement,TColStd_Array1OfReal& Coords,Standard_Integer& NbNodes,MeshVS_EntityType& Type) const; //! This method is similar to GetGeom, but returns only element or node type. This method is provided for
//! a fine performance.
Standard_EXPORT Standard_Boolean GetGeomType(const Standard_Integer ID,const Standard_Boolean IsElement,MeshVS_EntityType& Type) const; //! This method returns by number an address of any entity which represents element or node data structure.
Standard_EXPORT Standard_Address GetAddr(const Standard_Integer ID,const Standard_Boolean IsElement) const; //! This method returns information about what node this element consist of.
Standard_EXPORT virtual Standard_Boolean GetNodesByElement(const Standard_Integer ID,TColStd_Array1OfInteger& NodeIDs,Standard_Integer& NbNodes) const; //! This method returns map of all nodes the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllNodes() const; //! This method returns map of all elements the object consist of.
Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllElements() const; //! This method calculates normal of face, which is using for correct reflection presentation.
//! There is default method, for advance reflection this method can be redefined.
Standard_EXPORT virtual Standard_Boolean GetNormal(const Standard_Integer Id,const Standard_Integer Max,Standard_Real& nx,Standard_Real& ny,Standard_Real& nz) const; DEFINE_STANDARD_RTTI(XSDRAWSTLVRML_DataSource) protected: private: Handle_StlMesh_Mesh myMesh; TColStd_PackedMapOfInteger myNodes; TColStd_PackedMapOfInteger myElements; Handle_TColStd_HArray2OfInteger myElemNodes; Handle_TColStd_HArray2OfReal myNodeCoords; Handle_TColStd_HArray2OfReal myElemNormals; }; // other Inline functions and methods (like "C++: function call" methods) #endif