Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
MiDataSetIjk< _T > Class Template Referenceabstract

MeshViz Generic data set interface for structured volume meshes. More...

#include <MeshVizXLM/mesh/data/MiDataSetIjk.h>

+ Inheritance diagram for MiDataSetIjk< _T >:

Public Member Functions

virtual _T get (size_t i, size_t j, size_t k) const =0
 Returns the ijk-th value of this set.
 
virtual MiMeshIjk::StorageLayout getStorageLayout () const
 Hint about data organization in memory.
 
- Public Member Functions inherited from MiDataSet
virtual ~MiDataSet ()
 
virtual size_t getTimeStamp () const =0
 Returns for this dataset a unique time stamp across all datasets in the application.
 
virtual std::string getName () const =0
 Returns the name of this data set.
 
virtual DataBinding getBinding () const =0
 Returns the data binding of this data set.
 

Additional Inherited Members

- Public Types inherited from MiDataSet
enum  DataBinding {
  PER_CELL ,
  PER_NODE
}
 Data binding. More...
 
- Protected Member Functions inherited from MiDataSet
virtual std::ostream & toStream (std::ostream &s) const
 Performs an output operation on a stream which is returned afterward.
 

Detailed Description

template<typename _T>
class MiDataSetIjk< _T >

MeshViz Generic data set interface for structured volume meshes.

A generic abstract template interface for a data set usable in any extract of a structured volume mesh.

Definition at line 40 of file MiDataSetIjk.h.

Member Function Documentation

◆ get()

template<typename _T >
virtual _T MiDataSetIjk< _T >::get ( size_t  i,
size_t  j,
size_t  k 
) const
pure virtual

Returns the ijk-th value of this set.

◆ getStorageLayout()

template<typename _T >
virtual MiMeshIjk::StorageLayout MiDataSetIjk< _T >::getStorageLayout ( ) const
inlinevirtual

Hint about data organization in memory.

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

For instance LAYOUT_KJI means that:

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

The fastest way to go through the data 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
     data.get(i,j,k);

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

Definition at line 71 of file MiDataSetIjk.h.


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