Open CASCADE Technology  6.9.1
Public Member Functions
XSDRAWSTLVRML_DataSource Class Reference

The sample DataSource for working with STLMesh_Mesh. More...

#include <XSDRAWSTLVRML_DataSource.hxx>

Inheritance diagram for XSDRAWSTLVRML_DataSource:
Inheritance graph
[legend]

Public Member Functions

 XSDRAWSTLVRML_DataSource (const Handle< StlMesh_Mesh > &aMesh)
 Constructor. More...
 
Standard_Boolean GetGeom (const Standard_Integer ID, const Standard_Boolean IsElement, TColStd_Array1OfReal &Coords, Standard_Integer &NbNodes, MeshVS_EntityType &Type) const
 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. More...
 
Standard_Boolean GetGeomType (const Standard_Integer ID, const Standard_Boolean IsElement, 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. More...
 
Standard_Address GetAddr (const Standard_Integer ID, const Standard_Boolean IsElement) const
 This method returns by number an address of any entity which represents element or node data structure. More...
 
virtual Standard_Boolean GetNodesByElement (const Standard_Integer ID, TColStd_Array1OfInteger &NodeIDs, Standard_Integer &NbNodes) const
 This method returns information about what node this element consist of. More...
 
const TColStd_PackedMapOfIntegerGetAllNodes () const
 This method returns map of all nodes the object consist of. More...
 
const TColStd_PackedMapOfIntegerGetAllElements () const
 This method returns map of all elements the object consist of. More...
 
virtual Standard_Boolean GetNormal (const Standard_Integer Id, const Standard_Integer Max, Standard_Real &nx, Standard_Real &ny, Standard_Real &nz) 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. More...
 
- Public Member Functions inherited from MeshVS_DataSource
virtual Standard_Boolean Get3DGeom (const Standard_Integer ID, Standard_Integer &NbNodes, Handle< MeshVS_HArray1OfSequenceOfInteger > &Data) const
 This method returns topology information about 3D-element Returns false if element with ID isn't 3D or because other troubles. More...
 
virtual Standard_Boolean GetNodeNormal (const Standard_Integer ranknode, const Standard_Integer ElementId, Standard_Real &nx, Standard_Real &ny, Standard_Real &nz) const
 This method return normal of node ranknode of face Id, which is using for smooth shading presentation. Returns false if normal isn't defined. More...
 
virtual Standard_Boolean GetNormalsByElement (const Standard_Integer Id, const Standard_Boolean IsNodal, const Standard_Integer MaxNodes, Handle< TColStd_HArray1OfReal > &Normals) const
 This method puts components of normal vectors at each node of a mesh face (at each face of a mesh volume) into the output array. Returns false if some problem was detected during calculation of normals. Id is an identifier of the mesh element. IsNodal, when true, means that normals at mesh element nodes are needed. If nodal normals are not available, or IsNodal is false, or the mesh element is a volume, then the output array contents depend on the element type: face: a normal calculated by GetNormal() is duplicated for each node of the face; volume: normals to all faces of the volume are computed (not for each node!). MaxNodes is maximal number of nodes an element can consist of. Normals contains the result. More...
 
virtual void GetAllGroups (TColStd_PackedMapOfInteger &Ids) const
 This method returns map of all groups the object contains. More...
 
virtual Standard_Boolean GetGroup (const Standard_Integer Id, MeshVS_EntityType &Type, TColStd_PackedMapOfInteger &Ids) const
 This method returns map of all group elements. More...
 
virtual Standard_Address GetGroupAddr (const Standard_Integer ID) const
 This method returns pointer which represents group data structure. This address will be saved in MeshVS_MeshOwner, so that you can access to data structure fast by the method Owner(). In the redefined method you can return NULL. ID is the numerical identificator of group. More...
 
virtual Standard_Boolean IsAdvancedSelectionEnabled () const
 Returns True if advanced mesh selection is enabled. Default implementation returns False. It should be redefined to return True for advanced mesh selection activation. More...
 
virtual Bnd_Box GetBoundingBox () const
 Returns the bounding box of the whole mesh. It is used in advanced selection mode to define roughly the sensitive area of the mesh. It can be redefined to get access to a box computed in advance. More...
 
virtual Standard_Boolean GetDetectedEntities (const Handle< MeshVS_Mesh > &Prs, const Standard_Real X, const Standard_Real Y, const Standard_Real aTol, Handle< TColStd_HPackedMapOfInteger > &Nodes, Handle< TColStd_HPackedMapOfInteger > &Elements, Standard_Real &DMin)
 Returns maps of entities (nodes and elements) detected by mouse click at the point (X,Y) on the current view plane, with the tolerance aTol. DMin - is out argument should return actual detection tolerance. Returns True if something is detected. It should be redefined if the advanced mesh selection is activated. Default implementation returns False. More...
 
virtual Standard_Boolean GetDetectedEntities (const Handle< MeshVS_Mesh > &Prs, const Standard_Real XMin, const Standard_Real YMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real aTol, Handle< TColStd_HPackedMapOfInteger > &Nodes, Handle< TColStd_HPackedMapOfInteger > &Elements)
 Returns maps of entities (nodes and elements) detected by mouse selection with rectangular box (XMin, YMin, XMax, YMax) on the current veiw plane, with the tolerance aTol. Returns True if something is detected. It should be redefined if the advanced mesh selection is activated. Default implementation returns False. More...
 
virtual Standard_Boolean GetDetectedEntities (const Handle< MeshVS_Mesh > &Prs, const TColgp_Array1OfPnt2d &Polyline, const Bnd_Box2d &aBox, const Standard_Real aTol, Handle< TColStd_HPackedMapOfInteger > &Nodes, Handle< TColStd_HPackedMapOfInteger > &Elements)
 Returns maps of entities (nodes and elements) detected by mouse selection with the polyline <Polyline> on the current veiw plane, with the tolerance aTol. Returns True if something is detected. It should be redefined if the advanced mesh selection is activated. Default implementation returns False. More...
 
virtual Standard_Boolean GetDetectedEntities (const Handle< MeshVS_Mesh > &Prs, Handle< TColStd_HPackedMapOfInteger > &Nodes, Handle< TColStd_HPackedMapOfInteger > &Elements)
 Filter out the maps of mesh entities so as to keep only the entities that are allowed to be selected according to the current context. Returns True if any of the maps has been changed. It should be redefined if the advanced mesh selection is activated. Default implementation returns False. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const Handle_Standard_Type & DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

The sample DataSource for working with STLMesh_Mesh.

Constructor & Destructor Documentation

XSDRAWSTLVRML_DataSource::XSDRAWSTLVRML_DataSource ( const Handle< StlMesh_Mesh > &  aMesh)

Constructor.

Member Function Documentation

Standard_Address XSDRAWSTLVRML_DataSource::GetAddr ( const Standard_Integer  ID,
const Standard_Boolean  IsElement 
) const
virtual

This method returns by number an address of any entity which represents element or node data structure.

Implements MeshVS_DataSource.

const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllElements ( ) const
virtual

This method returns map of all elements the object consist of.

Implements MeshVS_DataSource.

const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllNodes ( ) const
virtual

This method returns map of all nodes the object consist of.

Implements MeshVS_DataSource.

Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeom ( const Standard_Integer  ID,
const Standard_Boolean  IsElement,
TColStd_Array1OfReal Coords,
Standard_Integer NbNodes,
MeshVS_EntityType Type 
) const
virtual

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.

Implements MeshVS_DataSource.

Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeomType ( const Standard_Integer  ID,
const Standard_Boolean  IsElement,
MeshVS_EntityType Type 
) const
virtual

This method is similar to GetGeom, but returns only element or node type. This method is provided for a fine performance.

Implements MeshVS_DataSource.

virtual Standard_Boolean XSDRAWSTLVRML_DataSource::GetNodesByElement ( const Standard_Integer  ID,
TColStd_Array1OfInteger NodeIDs,
Standard_Integer NbNodes 
) const
virtual

This method returns information about what node this element consist of.

Implements MeshVS_DataSource.

virtual Standard_Boolean XSDRAWSTLVRML_DataSource::GetNormal ( const Standard_Integer  Id,
const Standard_Integer  Max,
Standard_Real nx,
Standard_Real ny,
Standard_Real nz 
) const
virtual

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.

Reimplemented from MeshVS_DataSource.


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