Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::VolumeTetraMesh Class Reference

Data required for rendering an Inviwo Volume as tetrahedral mesh. More...

#include <volumetetramesh.h>

Inheritance diagram for inviwo::VolumeTetraMesh:

Public Member Functions

 VolumeTetraMesh (const std::shared_ptr< const Volume > &volume, int channel=0)
VolumeTetraMeshclone () 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 AxisgetAxis (size_t index) const override
Public Member Functions inherited from inviwo::SpatialEntity
 SpatialEntity (const glm::mat4 &modelMatrix)
 SpatialEntity (const glm::mat4 &modelMatrix, const glm::mat4 &worldMatrix)
 SpatialEntity (const SpatialEntity &rhs)
SpatialEntityoperator= (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 SpatialCoordinateTransformergetCoordinateTransformer () const
virtual const SpatialCameraCoordinateTransformergetCoordinateTransformer (const Camera &camera) const

Additional Inherited Members

Protected Attributes inherited from inviwo::SpatialEntity
std::unique_ptr< SpatialCoordinateTransformertransformer_
std::unique_ptr< SpatialCameraCoordinateTransformercameraTransformer_
glm::mat4 modelMatrix_
glm::mat4 worldMatrix_

Detailed Description

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.

Member Function Documentation

◆ clone()

VolumeTetraMesh * inviwo::VolumeTetraMesh::clone ( ) const
overridevirtual

Implements inviwo::TetraMesh.

◆ 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

Implements inviwo::TetraMesh.

◆ getNumberOfPoints()

virtual int inviwo::VolumeTetraMesh::getNumberOfPoints ( ) const
overridevirtual

Implements inviwo::TetraMesh.

◆ 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
volumeinput volume to be converted
channelvolume channel used as scalar values
Exceptions
Exceptionif one of the volume dimensions is less than 2

The documentation for this class was generated from the following file:
  • volumetetramesh.h