Data required for rendering an Inviwo Volume as tetrahedral mesh.
More...
#include <volumetetramesh.h>
|
| VolumeTetraMesh (const std::shared_ptr< const Volume > &volume, int channel=0) |
|
VolumeTetraMesh * | clone () const override |
|
void | setData (const std::shared_ptr< const Volume > &volume, int channel=0) |
|
virtual int | getNumberOfCells () const override |
|
virtual int | getNumberOfPoints () const override |
|
virtual void | get (std::vector< vec4 > &nodes, std::vector< ivec4 > &nodeIds) const override |
|
virtual mat4 | getBoundingBox () const override |
|
virtual dvec2 | getDataRange () const override |
|
virtual const Axis * | getAxis (size_t index) const override |
|
| SpatialEntity (const glm::mat4 &modelMatrix) |
|
| SpatialEntity (const glm::mat4 &modelMatrix, const glm::mat4 &worldMatrix) |
|
| SpatialEntity (const SpatialEntity &rhs) |
|
SpatialEntity & | operator= (const SpatialEntity &that) |
|
glm::vec3 | getOffset () const |
|
void | setOffset (const glm::vec3 &offset) |
|
glm::mat3 | getBasis () const |
|
void | setBasis (const glm::mat3 &basis) |
|
glm::mat4 | getModelMatrix () const |
|
void | setModelMatrix (const glm::mat4 &modelMatrix) |
|
glm::mat4 | getWorldMatrix () const |
|
void | setWorldMatrix (const glm::mat4 &worldMatrix) |
|
virtual const SpatialCoordinateTransformer & | getCoordinateTransformer () const |
|
virtual const SpatialCameraCoordinateTransformer & | getCoordinateTransformer (const Camera &camera) const |
|
Data required for rendering an Inviwo Volume as tetrahedral mesh.
Provides an interface between a Volume and the data structures required for rendering a tetrahedral mesh. Six tetrahedra are created in between each four voxels of the volume to convert the cell-centered data of the uniform grid of the Volume to node-centered values.
The extent of the TetraMesh will be smaller than the extent of the Volume by half a voxel in each dimension.
◆ clone()
◆ get()
virtual void inviwo::VolumeTetraMesh::get |
( |
std::vector< vec4 > & | nodes, |
|
|
std::vector< ivec4 > & | nodeIds ) const |
|
overridevirtual |
Fill the nodes
vector with the 3D coordinates of each node along with its scalar value (vec4). The scalar is stored in the w component. The nodeIds
vector is filled with the node/vertex IDs for each tetrahedron (ivec4). The faces opposite of each node are implicitly encoded. The coordinates are given in Data space and can be transformed to Model space using the Model matrix or SpatialCoordinateTransformer::getDataToModelMatrix().
Implements inviwo::TetraMesh.
◆ getAxis()
virtual const Axis * inviwo::VolumeTetraMesh::getAxis |
( |
size_t | index | ) |
const |
|
overridevirtual |
returns the axis information corresponding to index
- Returns
- nullptr if there is no axis for
index
Implements inviwo::SpatialEntity.
◆ getBoundingBox()
virtual mat4 inviwo::VolumeTetraMesh::getBoundingBox |
( |
| ) |
const |
|
overridevirtual |
Return the bounding box of all nodes of the tetrahedral mesh in world space. The bounding box is represented using a mat4, where all positions are between bbox * (x,y,z,1)
where x, y, and z are between 0 and 1.
Implements inviwo::TetraMesh.
◆ getDataRange()
virtual dvec2 inviwo::VolumeTetraMesh::getDataRange |
( |
| ) |
const |
|
overridevirtual |
Return the data range of the scalar values
- Returns
- scalar value range
Implements inviwo::TetraMesh.
◆ getNumberOfCells()
virtual int inviwo::VolumeTetraMesh::getNumberOfCells |
( |
| ) |
const |
|
overridevirtual |
◆ getNumberOfPoints()
virtual int inviwo::VolumeTetraMesh::getNumberOfPoints |
( |
| ) |
const |
|
overridevirtual |
◆ setData()
void inviwo::VolumeTetraMesh::setData |
( |
const std::shared_ptr< const Volume > & | volume, |
|
|
int | channel = 0 ) |
Use volume
as source for the tetrahedralization into a TetraMesh.
- Parameters
-
volume | input volume to be converted |
channel | volume channel used as scalar values |
- Exceptions
-
Exception | if one of the volume dimensions is less than 2 |
The documentation for this class was generated from the following file: