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. | |
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.
#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.
#define VVizTileInfo vec4 |
Defines internal VolumeViz tile info data storage.
See VVizGetTileResolution, VVizGetTileInfo
Definition at line 59 of file vvizStructure.h.
VVizDataSetId VVizGetDefaultDataSet | ( | ) |
Returns the default DataSet ID.
vec3 VVizGetTileDimensions | ( | in VVizDataSetId | dataset | ) |
Returns volume dataset tile dimensions in voxels.
dataset | The dataset to retrieve information from. |
void VVizGetTileIJKBox | ( | in VVizDataSetId | dataset, |
in vec3 | dataCoord, | ||
out vec3 | tileIJKMin, | ||
out vec3 | tileIJKMax | ||
) |
Returns VolumeViz tile IJK box info for a specified voxel.
dataset | The dataset to which the tileinfo belongs. |
dataCoord | Uniform data coordinates in volume space. |
tileIJKMin | ijk min of the tile in voxels. |
tileIJKMax | ijk max of the tile in voxels. |
VVizTileInfo VVizGetTileInfo | ( | in VVizDataSetId | dataset, |
in vec3 | dataCoord | ||
) |
Returns VolumeViz tile info for a specified voxel.
dataset | The dataset to retrieve information from. |
dataCoord | Uniform data coordinates in volume space. |
int VVizGetTileResolution | ( | in VVizTileInfo | tileInfo | ) |
Returns VolumeViz tile resolution info.
tileInfo | The tileInfo to retrieve information from. |
vec3 VVizGetVolumeDimensions | ( | in VVizDataSetId | dataset | ) |
Returns volume dimensions of a dataset in voxels.
dataset | The dataset to retrieve information from. |
vec3 VVizGetVoxelDimensions | ( | in VVizDataSetId | dataset | ) |
Returns volume dataset uniform voxel dimensions.
dataset | The dataset to retrieve information from. |
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.
dataset | The dataset to which the texture space belongs. |
objectCoord | The object space vector, in homogeneous coordinates. |
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.
dataset | The dataset to which the texture space belongs. |
objectCoord | The 3D object space vector, assumed to be a direction vector. |
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.
dataset | The dataset to which the texture space belongs. |
objectCoord | The 3D object space vector, assumed to be a position vector. |
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.
dataset | The dataset to which the texture space belongs. |
texCoord | The texture coordinate vector in homogeneous coordinates. |
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.
dataset | The dataset to which the texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a direction vector. |
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.
dataset | The dataset to which the texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a position vector. |
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.
datasetSrc | The dataset to which the initial texture space belongs. |
datasetDst | The dataset to which the final texture space belongs. |
texCoord | The texture coordinate vector in the initial texture space, in homogeneous coordinates. |
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.
datasetSrc | The dataset to which the initial texture space belongs. |
datasetDst | The dataset to which the final texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a direction vector. |
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.
datasetSrc | The dataset to which the initial texture space belongs. |
datasetDst | The dataset to which the final texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a position vector. |
vec4 VVizTextureToWorld | ( | in VVizDataSetId | dataset, |
in vec4 | texCoord | ||
) |
Converts the input vector from the input dataset's texture space to world space.
dataset | The dataset to which the texture space belongs. |
texCoord | The texture coordinate vector in homogeneous coordinates. |
vec3 VVizTextureToWorldDir | ( | in VVizDataSetId | dataset, |
in vec3 | texCoord | ||
) |
Converts the input vector from the input dataset's texture space to world space.
dataset | The dataset to which the texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a direction vector. |
vec3 VVizTextureToWorldVec | ( | in VVizDataSetId | dataset, |
in vec3 | texCoord | ||
) |
Converts the input vector from the input dataset's texture space to world space.
dataset | The dataset to which the texture space belongs. |
texCoord | The 3D texture coordinate vector, assumed to be a position vector. |
vec4 VVizWorldToTexture | ( | in VVizDataSetId | dataset, |
in vec4 | worldCoord | ||
) |
Converts the input vector from world space to the input dataset's texture space.
dataset | The dataset to which the texture space belongs. |
worldCoord | The world space vector, in homogeneous coordinates. |
vec3 VVizWorldToTextureDir | ( | in VVizDataSetId | dataset, |
in vec3 | worldCoord | ||
) |
Converts the input vector from world space to the input dataset's texture space.
dataset | The dataset to which the texture space belongs. |
worldCoord | The 3D world space vector, assumed to be a direction vector. |
vec3 VVizWorldToTextureVec | ( | in VVizDataSetId | dataset, |
in vec3 | worldCoord | ||
) |
Converts the input vector from world space to the input dataset's texture space.
dataset | The dataset to which the texture space belongs. |
worldCoord | The 3D world space vector, assumed to be a position vector. |