Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
MiGeometryHexahedronIjk Class Referenceabstract

MeshViz Generic geometry interface for hexahedron mesh Ijk. More...

#include <MeshVizXLM/mesh/geometry/MiGeometryHexahedronIjk.h>

+ Inheritance diagram for MiGeometryHexahedronIjk:

Public Member Functions

virtual void getCellCoords (size_t i, size_t j, size_t k, MbVec3d &v0, MbVec3d &v1, MbVec3d &v2, MbVec3d &v3, MbVec3d &v4, MbVec3d &v5, MbVec3d &v6, MbVec3d &v7) const =0
 Returns the coordinates of the hexahedron (i,j,k) cell.
 
virtual MiMeshIjk::StorageLayout getStorageLayout () const
 Hint about hexahedron organization in memory.
 
- Public Member Functions inherited from MiGeometry
virtual ~MiGeometry ()
 
virtual size_t getTimeStamp () const =0
 Returns for this geometry a unique time stamp across all geometries in the application.
 
virtual SoDEPRECATED MbVec3d getMin () const
 Returns the minimum value of this set.
 
virtual SoDEPRECATED MbVec3d getMax () const
 Returns the maximum value of this set.
 

Additional Inherited Members

- Protected Member Functions inherited from MiGeometry
virtual std::ostream & toStream (std::ostream &s) const
 Performs an output operation on a stream which is returned afterward.
 

Detailed Description

MeshViz Generic geometry interface for hexahedron mesh Ijk.

Generic geometry interface representing a 3D grid of hexahedron cells, where each hexahedron is defined explicitly with 8 independent coordinates. Each hexahedron is accessible via 3 indices (i,j,k).

This type of geometry is typically used by the MiVolumeMeshVertexHexahedronIjk interface.

The vertices of each hexahedron are numbered as follows (see getCellCoords for more details):

                       J
                       |
                       |

                      n3----------n2
                      /|          /|
                    /  |        /  |
                  /    |      /    |
                n7---------n6      |
                 |     |    |      |
                 |    n0----|-----n1    --- I
                 |    /     |     /
                 |  /       |   /
                 |/         | /
                n4---------n5

              /
            /
          K

Definition at line 65 of file MiGeometryHexahedronIjk.h.

Member Function Documentation

◆ getCellCoords()

virtual void MiGeometryHexahedronIjk::getCellCoords ( size_t  i,
size_t  j,
size_t  k,
MbVec3d v0,
MbVec3d v1,
MbVec3d v2,
MbVec3d v3,
MbVec3d v4,
MbVec3d v5,
MbVec3d v6,
MbVec3d v7 
) const
pure virtual

Returns the coordinates of the hexahedron (i,j,k) cell.

The vertices of each hexahedron are numbered as follows :

  • The first 4 vertices define the "bottom" face of the hexahedron. This face is on the logical IJ plane K=k.
  • The last 4 vertices define the "top" face of the hexahedron. This face is on the logical IJ plane K=k+1.
    Vertices numbering
Parameters
i[in] the id of this hexahedron on the axis I. 0 <= i < meshTopologyIjk.getNumCellsI().
j[in] the id of this hexahedron on the axis J. 0 <= j < meshTopologyIjk.getNumCellsJ().
k[in] the id of this hexahedron on the axis K. 0 <= k < meshTopologyIjk.getNumCellsK().
v0,v1,v2,v3,v4,v5,v6,v7[out] the 8 vertices of the hexahedron (i,j,k).

◆ getStorageLayout()

virtual MiMeshIjk::StorageLayout MiGeometryHexahedronIjk::getStorageLayout ( ) const
inlinevirtual

Hint about hexahedron organization in memory.

This information aims at optimizing the geometry traversal for extractors. Returns the geometry internal hexahedron layout in memory as 6 enum values covering all possible cases.

For example, LAYOUT_KJI means that:

  • the hexahedron (i+1,j,k) is consecutive in memory to the hexahedron (i,j,k) and,
  • the row of hexahedron (j+1,k) is consecutive in memory to the row of hexahedron (j,k) and,
  • the slice of hexahedron (k+1) is consecutive in memory to the slice of hexahedron (k)

The fastest way to go through a hexahedron mesh with LAYOUT_KJI should be to perform the following triple loop:

for each k with 0 <= k < numK
 for each j with 0 <= j < numJ
   for each i with 0 <= i < numI
     geometry.getCellCoords(i,j,k,n0, ... ,n7);

The default implementation returns LAYOUT_UNKNOWN meaning that the hexahedron storage organization is unknown, for instance when hexahedron are computed on the fly. In that case, extractors perform the hexahedron traversal in the way that minimizes the required memory for their algorithms.

Definition at line 107 of file MiGeometryHexahedronIjk.h.


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