Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PbVoxelCell Class Reference

MeshViz Defines a voxel cell of a volume mesh. More...

#include <MeshViz/3Ddata/PbVoxelCell.h>

+ Inheritance diagram for PbVoxelCell:

Public Member Functions

 PbVoxelCell (const PbMesh *owner_mesh)
 Constructor of a default simple cell.
 
 PbVoxelCell (const PbVoxelCell &cell)
 Copy constructor.
 
 ~PbVoxelCell ()
 Destructor.
 
PbVoxelCelloperator= (const PbVoxelCell &cell)
 Assignment operator.
 
virtual float getLongestEdgeLength () const
 Gets the length of the longest edge of the cell.
 
virtual SbBox3f getBoundingBox () const
 Gets the cell's bounding box.
 
void getBounds (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const
 Gets the cell's bounds.
 
virtual SbVec3f getCenter () const
 Gets the cell's geometric center.
 
virtual float getVolume () const
 Gets the volume of the cell.
 
virtual float getArea () const
 Returns always 0.
 
virtual void getNodesIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const
 Gets the array of 2 index mesh's nodes that belongs to a given edge of this cell.
 
virtual void getNodesIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const
 Gets the array of index mesh's nodes that belongs to a given facet of this cell.
 
virtual void getNodesLocalIndexOfEdge (int edge, PbArrayOfInt &nodes_index) const
 Gets the array of 2 nodes index that belongs to a given edge of this cell.
 
virtual void getNodesLocalIndexOfFacet (int facet, PbArrayOfInt &nodes_index) const
 Gets the array of node index that belongs to a given facet of this cell.
 
virtual int locatePoint (const SbVec3f &coord, float tolerance, SbVec3f &pcoord) const
 Returns 1 if the point is inside the cell, 0 otherwise.
 
virtual void getWeight (const SbVec3f &pcoord, float *weight) const
 Gets the 8 weights of a point defined by its parametric coordinates.
 
virtual float getValue (const SbVec3f &pcoord, const float *s) const
 Get the scalar value of a point in the cell.
 
virtual SbVec3f getValue (const SbVec3f &pcoord, const SbVec3f *v) const
 Get the vector value of a point in the cell.
 
- Public Member Functions inherited from PbCell
 PbCell ()
 Constructor.
 
 PbCell (const PbCell &cell)
 Copy constructor.
 
 ~PbCell ()
 Destructor.
 
PbCelloperator= (const PbCell &cell)
 Assignment operator.
 
int getNumFacets () const
 Gets the number of facets.
 
int getNumEdges () const
 Gets the number of edges.
 
int getNumNodes () const
 Gets the number of nodes.
 
int getIndex () const
 Gets the index of the cell in the mesh.
 
SbVec3f getNodeCoord (int nod) const
 Gets the coordinate of the nod (nod must be >=0 and < getNumNodes()).
 
int getNodeIndex (int nod) const
 Gets the index (in the mesh) of a nod (nod must be >=0 and < getNumNodes()).
 
void getNodesIndex (PbArrayOfInt &nodes_index) const
 Gets the array of index mesh's nodes that belongs to this cell.
 
float getValue (const float *weight, const float *s) const
 Gets the scalar value of a point in this cell, given the point's weights.
 
SbVec3f getValue (const float *weight, const SbVec3f *v) const
 Gets the vector value of a point in this cell, given the point's weights.
 
- Public Member Functions inherited from PbBase
void enableConnection (SbBool flag)
 Activates/deactivates the mechanism of connection.
 
SbBool isConnectionEnabled () const
 Returns TRUE if the connection mechanism is active, otherwise FALSE.
 
void touch ()
 Simulates the changing of an instance of this object, so all connected objects are informed of this change.
 
PbBaseoperator= (const PbBase &base)
 Assignment operator.
 

Detailed Description

MeshViz Defines a voxel cell of a volume mesh.

A voxel is a parallelepipede of which faces are orthogonal to X, Y, Z axes. Each facet is a rectangle not necessarily a square. The 4 first indices defines a facet oriented towards the interior of the cell.

Facets, nodes and edges are numbered as following :

              4-----------7                    facet 0 = 0374  edge 0 = 01
             /|          /|       k            facet 1 = 1562  edge 1 = 12
           /  |        /  |       |            facet 2 = 0451  edge 2 = 23
         /    |      /    |       |            facet 3 = 3267  edge 3 = 30
        5----------6      |       |            facet 4 = 0123  edge 4 = 45
        |     |    |      |       ....... j    facet 5 = 4765  edge 5 = 56
        |     0----|------3      .                             edge 6 = 67
        |    /     |     /      .                              edge 7 = 74
        |  /       |   /       .                               edge 8 = 04
        |/         | /        i                                edge 9 = 15
        1----------2                                           edge10 = 26
                                                               edge11 = 37

This numerotation must be respected to have the right result returned by getVolume().(i.e. edge 01 on Xaxis, edge 12 on Yaxis, edge 26 on Zaxis)

Definition at line 63 of file PbVoxelCell.h.

Constructor & Destructor Documentation

◆ PbVoxelCell() [1/2]

PbVoxelCell::PbVoxelCell ( const PbMesh owner_mesh)

Constructor of a default simple cell.

◆ PbVoxelCell() [2/2]

PbVoxelCell::PbVoxelCell ( const PbVoxelCell cell)

Copy constructor.

◆ ~PbVoxelCell()

PbVoxelCell::~PbVoxelCell ( )

Destructor.

Member Function Documentation

◆ getArea()

virtual float PbVoxelCell::getArea ( ) const
inlinevirtual

Returns always 0.

Implements PbCell.

Definition at line 118 of file PbVoxelCell.h.

◆ getBoundingBox()

virtual SbBox3f PbVoxelCell::getBoundingBox ( ) const
virtual

Gets the cell's bounding box.

Reimplemented from PbCell.

◆ getBounds()

void PbVoxelCell::getBounds ( float &  xmin,
float &  ymin,
float &  zmin,
float &  xmax,
float &  ymax,
float &  zmax 
) const
virtual

Gets the cell's bounds.

Similar to getBoundingBox() but it does not use any SbBox object.

Reimplemented from PbCell.

◆ getCenter()

virtual SbVec3f PbVoxelCell::getCenter ( ) const
virtual

Gets the cell's geometric center.

Reimplemented from PbCell.

◆ getLongestEdgeLength()

virtual float PbVoxelCell::getLongestEdgeLength ( ) const
virtual

Gets the length of the longest edge of the cell.

Implements PbCell.

◆ getNodesIndexOfEdge()

virtual void PbVoxelCell::getNodesIndexOfEdge ( int  edge,
PbArrayOfInt nodes_index 
) const
virtual

Gets the array of 2 index mesh's nodes that belongs to a given edge of this cell.

(edge must be >=0 and < 12)

Implements PbCell.

◆ getNodesIndexOfFacet()

virtual void PbVoxelCell::getNodesIndexOfFacet ( int  facet,
PbArrayOfInt nodes_index 
) const
virtual

Gets the array of index mesh's nodes that belongs to a given facet of this cell.

(facet must be >=0 and < 6)

Implements PbCell.

◆ getNodesLocalIndexOfEdge()

virtual void PbVoxelCell::getNodesLocalIndexOfEdge ( int  edge,
PbArrayOfInt nodes_index 
) const
virtual

Gets the array of 2 nodes index that belongs to a given edge of this cell.

edge must be >=0 and < 12. Each index in nodes_index is >=0 and < 8.

Implements PbCell.

◆ getNodesLocalIndexOfFacet()

virtual void PbVoxelCell::getNodesLocalIndexOfFacet ( int  facet,
PbArrayOfInt nodes_index 
) const
virtual

Gets the array of node index that belongs to a given facet of this cell.

facet must be >=0 and < 6. Each index is >=0 and < 8.

Implements PbCell.

◆ getValue() [1/2]

virtual float PbVoxelCell::getValue ( const SbVec3f pcoord,
const float *  s 
) const
virtual

Get the scalar value of a point in the cell.

Parameters
pcoord[in] Parametric [0..1] coordinate of the point inside the cell.
s[in] The scalar dataset to interpolate
Returns
The interpolated value

Reimplemented from PbCell.

◆ getValue() [2/2]

virtual SbVec3f PbVoxelCell::getValue ( const SbVec3f pcoord,
const SbVec3f v 
) const
virtual

Get the vector value of a point in the cell.

Parameters
pcoord[in] Parametric [0..1] coordinate of the point inside the cell.
v[in] The vector dataset to interpolate
Returns
The interpolated value

Reimplemented from PbCell.

◆ getVolume()

virtual float PbVoxelCell::getVolume ( ) const
inlinevirtual

Gets the volume of the cell.

Implements PbCell.

Definition at line 113 of file PbVoxelCell.h.

◆ getWeight()

virtual void PbVoxelCell::getWeight ( const SbVec3f pcoord,
float *  weight 
) const
virtual

Gets the 8 weights of a point defined by its parametric coordinates.

Implements PbCell.

◆ locatePoint()

virtual int PbVoxelCell::locatePoint ( const SbVec3f coord,
float  tolerance,
SbVec3f pcoord 
) const
virtual

Returns 1 if the point is inside the cell, 0 otherwise.

Gets also the parametric coordinate of the point .

Implements PbCell.

◆ operator=()

PbVoxelCell & PbVoxelCell::operator= ( const PbVoxelCell cell)

Assignment operator.


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