Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Data structures and constant

VolumeViz VolumeViz GLSL shaders data structures and constants. More...

Classes

struct  VVizVoxelInfo
 Defines voxel state info used with the VolumeViz Shader Library API. More...
 

Macros

#define VVizDefaultData   VVIZ_DATATYPE(0.0)
 Default voxel value returned by VolumeViz shaders when no data is available.
 
#define VVizTileInfo   vec4
 Defines internal VolumeViz tile info data storage.
 

Functions

vec3 VVizGetVolumeDimensions (in VVizDataSetId dataset)
 Returns volume dimensions of a dataset in voxels.
 
vec3 VVizGetTileDimensions (in VVizDataSetId dataset)
 Returns volume dataset tile dimensions in voxels.
 
vec3 VVizGetVoxelDimensions (in VVizDataSetId dataset)
 Returns volume dataset uniform voxel dimensions.
 
int VVizGetTileResolution (in VVizTileInfo tileInfo)
 Returns VolumeViz tile resolution info.
 
VVizTileInfo VVizGetTileInfo (in VVizDataSetId dataset, in vec3 dataCoord)
 Returns VolumeViz tile info for a specified voxel.
 
void VVizGetTileIJKBox (in VVizDataSetId dataset, in vec3 dataCoord, out vec3 tileIJKMin, out vec3 tileIJKMax)
 Returns VolumeViz tile IJK box info for a specified voxel.
 
VVizDataSetId VVizGetDefaultDataSet ()
 Returns the default DataSet ID.
 
vec4 VVizTextureToObject (in VVizDataSetId dataset, in vec4 texCoord)
 Converts the input vector from the input dataset's texture space to object space.
 
vec3 VVizTextureToObjectVec (in VVizDataSetId dataset, in vec3 texCoord)
 Converts the input vector from the input dataset's texture space to object space.
 
vec3 VVizTextureToObjectDir (in VVizDataSetId dataset, in vec3 texCoord)
 Converts the input vector from the input dataset's texture space to object space.
 
vec4 VVizObjectToTexture (in VVizDataSetId dataset, in vec4 objectCoord)
 Converts the input vector from object space to the input dataset's texture space.
 
vec3 VVizObjectToTextureVec (in VVizDataSetId dataset, in vec3 objectCoord)
 Converts the input vector from object space to the input dataset's texture space.
 
vec3 VVizObjectToTextureDir (in VVizDataSetId dataset, in vec3 objectCoord)
 Converts the input vector from object space to the input dataset's texture space.
 
vec4 VVizTextureToWorld (in VVizDataSetId dataset, in vec4 texCoord)
 Converts the input vector from the input dataset's texture space to world space.
 
vec3 VVizTextureToWorldVec (in VVizDataSetId dataset, in vec3 texCoord)
 Converts the input vector from the input dataset's texture space to world space.
 
vec3 VVizTextureToWorldDir (in VVizDataSetId dataset, in vec3 texCoord)
 Converts the input vector from the input dataset's texture space to world space.
 
vec4 VVizWorldToTexture (in VVizDataSetId dataset, in vec4 worldCoord)
 Converts the input vector from world space to the input dataset's texture space.
 
vec3 VVizWorldToTextureVec (in VVizDataSetId dataset, in vec3 worldCoord)
 Converts the input vector from world space to the input dataset's texture space.
 
vec3 VVizWorldToTextureDir (in VVizDataSetId dataset, in vec3 worldCoord)
 Converts the input vector from world space to the input dataset's texture space.
 
vec4 VVizTextureToTexture (in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec4 texCoord)
 Converts the input vector from the texture space of one dataset to the texture space of another dataset.
 
vec3 VVizTextureToTextureVec (in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec3 texCoord)
 Converts the input vector from the texture space of one dataset to the texture space of another dataset.
 
vec3 VVizTextureToTextureDir (in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec3 texCoord)
 Converts the input vector from the texture space of one dataset to the texture space of another dataset.
 

Detailed Description

VolumeViz VolumeViz GLSL shaders data structures and constants.

The following pre-processing directives are dynamically added to the shader pipeline and can be used by application defined shader functions.

- VVIZ_DATARGBA : Is true if VVizData (VolumeViz input data) contains RGBA values.
In this case each value in VVizData is a vec4. Otherwise each value is a float.
(Before Open Inventor 8.5 only float values were supported.)

- VVIZ_DATATYPE : A string defining the GLSL data type in the volume (VVizData).
If VVIZ_DATARGBA is true, then VVIZ_DATATYPE is defined as "vec4", in all other cases it is defined as "float".
(Before Open Inventor 8.5 only type float was supported.)

- VVIZ_NUM_CLIPPING_PLANES : Defines the current numbers of GL clipping planes to take in account.

- VVIZ_SHAPE_TYPE : Define the shape that is currently rendered.
It can be usefull to specialize shader behavior depending on dhape type. It can be VVIZ_VRENDER, VVIZ_SLICE, VVIZ_OBLSLICE, VVIZ_VGEOM, VVIZ_VSKIN or VVIZ_HEIGHTFIELD.

Macro Definition Documentation

◆ VVizDefaultData

#define VVizDefaultData   VVIZ_DATATYPE(0.0)

Default voxel value returned by VolumeViz shaders when no data is available.

Definition at line 31 of file vvizGetData_frag.h.

◆ VVizTileInfo

#define VVizTileInfo   vec4

Defines internal VolumeViz tile info data storage.

See VVizGetTileResolution, VVizGetTileInfo

Definition at line 59 of file vvizStructure.h.

Function Documentation

◆ VVizGetDefaultDataSet()

VVizDataSetId VVizGetDefaultDataSet ( )

Returns the default DataSet ID.

◆ VVizGetTileDimensions()

vec3 VVizGetTileDimensions ( in VVizDataSetId  dataset)

Returns volume dataset tile dimensions in voxels.

Parameters
datasetThe dataset to retrieve information from.
Returns
dataset Tile dimension.

◆ VVizGetTileIJKBox()

void VVizGetTileIJKBox ( in VVizDataSetId  dataset,
in vec3  dataCoord,
out vec3  tileIJKMin,
out vec3  tileIJKMax 
)

Returns VolumeViz tile IJK box info for a specified voxel.

Parameters
datasetThe dataset to which the tileinfo belongs.
dataCoordUniform data coordinates in volume space.
tileIJKMinijk min of the tile in voxels.
tileIJKMaxijk max of the tile in voxels.

◆ VVizGetTileInfo()

VVizTileInfo VVizGetTileInfo ( in VVizDataSetId  dataset,
in vec3  dataCoord 
)

Returns VolumeViz tile info for a specified voxel.

Parameters
datasetThe dataset to retrieve information from.
dataCoordUniform data coordinates in volume space.
Returns
The tileInfo of the voxel at position dataCoord.

◆ VVizGetTileResolution()

int VVizGetTileResolution ( in VVizTileInfo  tileInfo)

Returns VolumeViz tile resolution info.

Parameters
tileInfoThe tileInfo to retrieve information from.
Returns
The LDM resolution level of this tile (zero is full resolution).

◆ VVizGetVolumeDimensions()

vec3 VVizGetVolumeDimensions ( in VVizDataSetId  dataset)

Returns volume dimensions of a dataset in voxels.

Parameters
datasetThe dataset to retrieve information from.
Returns
dataset Dimension.

◆ VVizGetVoxelDimensions()

vec3 VVizGetVoxelDimensions ( in VVizDataSetId  dataset)

Returns volume dataset uniform voxel dimensions.

Parameters
datasetThe dataset to retrieve information from.
Returns
dataset Voxel uniform dimension.

◆ VVizObjectToTexture()

vec4 VVizObjectToTexture ( in VVizDataSetId  dataset,
in vec4  objectCoord 
)

Converts the input vector from object space to the input dataset's texture space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
objectCoordThe object space vector, in homogeneous coordinates.
Returns
The converted vector in texture space, in homogeneous coordinates.

◆ VVizObjectToTextureDir()

vec3 VVizObjectToTextureDir ( in VVizDataSetId  dataset,
in vec3  objectCoord 
)

Converts the input vector from object space to the input dataset's texture space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
objectCoordThe 3D object space vector, assumed to be a direction vector.
Returns
The converted 3D direction vector in the dataset's texture space. The intermediate homogeneous (vec4) value is converted to 3D by ignoring the W component.

◆ VVizObjectToTextureVec()

vec3 VVizObjectToTextureVec ( in VVizDataSetId  dataset,
in vec3  objectCoord 
)

Converts the input vector from object space to the input dataset's texture space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
objectCoordThe 3D object space vector, assumed to be a position vector.
Returns
The converted 3D position vector in the dataset's texture space. The intermediate homogeneous (vec4) value is converted to 3D by dividing the X, Y and Z components by W.

◆ VVizTextureToObject()

vec4 VVizTextureToObject ( in VVizDataSetId  dataset,
in vec4  texCoord 
)

Converts the input vector from the input dataset's texture space to object space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe texture coordinate vector in homogeneous coordinates.
Returns
The converted vector in object space in homogeneous coordinates.

◆ VVizTextureToObjectDir()

vec3 VVizTextureToObjectDir ( in VVizDataSetId  dataset,
in vec3  texCoord 
)

Converts the input vector from the input dataset's texture space to object space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a direction vector.
Returns
The converted 3D direction vector in object space. The intermediate homogeneous (vec4) value is converted to 3D by ignoring the W component.

◆ VVizTextureToObjectVec()

vec3 VVizTextureToObjectVec ( in VVizDataSetId  dataset,
in vec3  texCoord 
)

Converts the input vector from the input dataset's texture space to object space.

Object space corresponds to the space defined by the extent of the dataset.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a position vector.
Returns
The converted 3D position vector in object space. The intermediate homogeneous (vec4) value is converted to 3D by dividing the X, Y and Z components by W.

◆ VVizTextureToTexture()

vec4 VVizTextureToTexture ( in VVizDataSetId  datasetSrc,
in VVizDataSetId  datasetDst,
in vec4  texCoord 
)

Converts the input vector from the texture space of one dataset to the texture space of another dataset.

Parameters
datasetSrcThe dataset to which the initial texture space belongs.
datasetDstThe dataset to which the final texture space belongs.
texCoordThe texture coordinate vector in the initial texture space, in homogeneous coordinates.
Returns
The converted vector in the destination texture space, in homogeneous coordinates.

◆ VVizTextureToTextureDir()

vec3 VVizTextureToTextureDir ( in VVizDataSetId  datasetSrc,
in VVizDataSetId  datasetDst,
in vec3  texCoord 
)

Converts the input vector from the texture space of one dataset to the texture space of another dataset.

Parameters
datasetSrcThe dataset to which the initial texture space belongs.
datasetDstThe dataset to which the final texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a direction vector.
Returns
The converted 3D direction vector in the destination texture space. The intermediate homogeneous (vec4) value is converted to 3D by ignoring the W component.

◆ VVizTextureToTextureVec()

vec3 VVizTextureToTextureVec ( in VVizDataSetId  datasetSrc,
in VVizDataSetId  datasetDst,
in vec3  texCoord 
)

Converts the input vector from the texture space of one dataset to the texture space of another dataset.

Parameters
datasetSrcThe dataset to which the initial texture space belongs.
datasetDstThe dataset to which the final texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a position vector.
Returns
The converted 3D position vector in the destination texture space. The intermediate homogeneous (vec4) value is converted to 3D by dividing the X, Y and Z components by W.

◆ VVizTextureToWorld()

vec4 VVizTextureToWorld ( in VVizDataSetId  dataset,
in vec4  texCoord 
)

Converts the input vector from the input dataset's texture space to world space.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe texture coordinate vector in homogeneous coordinates.
Returns
The converted vector in world space in homogeneous coordinates.

◆ VVizTextureToWorldDir()

vec3 VVizTextureToWorldDir ( in VVizDataSetId  dataset,
in vec3  texCoord 
)

Converts the input vector from the input dataset's texture space to world space.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a direction vector.
Returns
The converted 3D direction vector in world space. The intermediate homogeneous (vec4) value is converted to 3D by ignoring the W component.

◆ VVizTextureToWorldVec()

vec3 VVizTextureToWorldVec ( in VVizDataSetId  dataset,
in vec3  texCoord 
)

Converts the input vector from the input dataset's texture space to world space.

Parameters
datasetThe dataset to which the texture space belongs.
texCoordThe 3D texture coordinate vector, assumed to be a position vector.
Returns
The converted 3D position vector in world space. The intermediate homogeneous (vec4) value is converted to 3D by dividing the X, Y and Z components by W.

◆ VVizWorldToTexture()

vec4 VVizWorldToTexture ( in VVizDataSetId  dataset,
in vec4  worldCoord 
)

Converts the input vector from world space to the input dataset's texture space.

Parameters
datasetThe dataset to which the texture space belongs.
worldCoordThe world space vector, in homogeneous coordinates.
Returns
The converted vector in texture space, in homogeneous coordinates.

◆ VVizWorldToTextureDir()

vec3 VVizWorldToTextureDir ( in VVizDataSetId  dataset,
in vec3  worldCoord 
)

Converts the input vector from world space to the input dataset's texture space.

Parameters
datasetThe dataset to which the texture space belongs.
worldCoordThe 3D world space vector, assumed to be a direction vector.
Returns
The converted 3D direction vector in the dataset's texture space. The intermediate homogeneous (vec4) value is converted to 3D by ignoring the W component.

◆ VVizWorldToTextureVec()

vec3 VVizWorldToTextureVec ( in VVizDataSetId  dataset,
in vec3  worldCoord 
)

Converts the input vector from world space to the input dataset's texture space.

Parameters
datasetThe dataset to which the texture space belongs.
worldCoordThe 3D world space vector, assumed to be a position vector.
Returns
The converted 3D position vector in the dataset's texture space. The intermediate homogeneous (vec4) value is converted to 3D by dividing the X, Y and Z components by W.