Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
vvizStructure.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef VVIZ_STRUCTURE_H
24#define VVIZ_STRUCTURE_H
25
33vec3 VVizGetVolumeDimensions(in VVizDataSetId dataset);
34
42vec3 VVizGetTileDimensions(in VVizDataSetId dataset);
43
51vec3 VVizGetVoxelDimensions(in VVizDataSetId dataset);
52
59#define VVizTileInfo vec4
60
69
78VVizTileInfo VVizGetTileInfo(in VVizDataSetId dataset, in vec3 dataCoord);
79
89void VVizGetTileIJKBox(in VVizDataSetId dataset, in vec3 dataCoord, out vec3 tileIJKMin, out vec3 tileIJKMax);
90
95VVizDataSetId VVizGetDefaultDataSet();
96
97
107vec4 VVizTextureToObject(in VVizDataSetId dataset, in vec4 texCoord);
108
119vec3 VVizTextureToObjectVec(in VVizDataSetId dataset, in vec3 texCoord);
120
131vec3 VVizTextureToObjectDir(in VVizDataSetId dataset, in vec3 texCoord);
132
133
143vec4 VVizObjectToTexture(in VVizDataSetId dataset, in vec4 objectCoord);
144
155vec3 VVizObjectToTextureVec(in VVizDataSetId dataset, in vec3 objectCoord);
156
167vec3 VVizObjectToTextureDir(in VVizDataSetId dataset, in vec3 objectCoord);
168
169
178vec4 VVizTextureToWorld(in VVizDataSetId dataset, in vec4 texCoord);
179
189vec3 VVizTextureToWorldVec(in VVizDataSetId dataset, in vec3 texCoord);
190
200vec3 VVizTextureToWorldDir(in VVizDataSetId dataset, in vec3 texCoord);
201
202
211vec4 VVizWorldToTexture(in VVizDataSetId dataset, in vec4 worldCoord);
212
222vec3 VVizWorldToTextureVec(in VVizDataSetId dataset, in vec3 worldCoord);
223
233vec3 VVizWorldToTextureDir(in VVizDataSetId dataset, in vec3 worldCoord);
234
235
245vec4 VVizTextureToTexture(in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec4 texCoord);
246
257vec3 VVizTextureToTextureVec(in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec3 texCoord);
258
269vec3 VVizTextureToTextureDir(in VVizDataSetId datasetSrc, in VVizDataSetId datasetDst, in vec3 texCoord);
270
276{
285 VVIZ_DATATYPE value;
286
287 // PRIVATE members
288 // Texture coordinate in Physical Space
290 // Physical tile information
291 // - tileInfo.xyz = tile's origin coordinate
292 // - tileInfo.w = tile's ldm resolution
294 //Used by VVizEdgeImageSpace and accumulated along the ray
295 // - nprData.x = viewspace Z
296 // - nprData.y = normal factor
298
299 // coordinates of sample in volume space.
300 // most of the time, equal to texCoord but may be different in case of projection
301 // or in voxelized rendering.
302 // Difference with texCoord is that texCoord represent where we will access data whereas
303 // sample coord represent where is the current sample of raycast.
305};
306
307
317{
318 vec3 texCoords[8];
319 VVIZ_DATATYPE values[8];
320 // Coeffs used for linear interpolation (ie: fractionnal part of texcoords)
321 vec3 coeffs;
322};
323
324#endif
vec4 VVizTextureToWorld(in VVizDataSetId dataset, in vec4 texCoord)
Converts the input vector from the input dataset's texture space to world space.
vec3 VVizTextureToObjectDir(in VVizDataSetId dataset, in vec3 texCoord)
Converts the input vector from the input dataset's texture space to object space.
vec3 VVizObjectToTextureDir(in VVizDataSetId dataset, in vec3 objectCoord)
Converts the input vector from object 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.
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 datas...
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 datas...
VVizDataSetId VVizGetDefaultDataSet()
Returns the default DataSet ID.
vec4 VVizObjectToTexture(in VVizDataSetId dataset, in vec4 objectCoord)
Converts the input vector from object space to the input dataset's texture space.
vec3 VVizGetVoxelDimensions(in VVizDataSetId dataset)
Returns volume dataset uniform voxel dimensions.
vec3 VVizTextureToWorldDir(in VVizDataSetId dataset, in vec3 texCoord)
Converts the input vector from the input dataset's texture space to world space.
vec4 VVizTextureToObject(in VVizDataSetId dataset, in vec4 texCoord)
Converts the input vector from the input dataset's texture space to object space.
int VVizGetTileResolution(in VVizTileInfo tileInfo)
Returns VolumeViz tile resolution info.
vec4 VVizWorldToTexture(in VVizDataSetId dataset, in vec4 worldCoord)
Converts the input vector from world 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.
#define VVizTileInfo
Defines internal VolumeViz tile info data storage.
vec3 VVizGetVolumeDimensions(in VVizDataSetId dataset)
Returns volume dimensions of a dataset in voxels.
vec3 VVizTextureToWorldVec(in VVizDataSetId dataset, in vec3 texCoord)
Converts the input vector from the input dataset's texture space to world space.
VVizTileInfo VVizGetTileInfo(in VVizDataSetId dataset, in vec3 dataCoord)
Returns VolumeViz tile info for a specified voxel.
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 datas...
vec3 VVizGetTileDimensions(in VVizDataSetId dataset)
Returns volume dataset tile dimensions in voxels.
vec3 VVizTextureToObjectVec(in VVizDataSetId dataset, in vec3 texCoord)
Converts the input vector from the input dataset's texture space to object space.
vec3 VVizWorldToTextureVec(in VVizDataSetId dataset, in vec3 worldCoord)
Converts the input vector from world space to the input dataset's texture space.
void VVizGetTileIJKBox(in VVizDataSetId dataset, in vec3 dataCoord, out vec3 tileIJKMin, out vec3 tileIJKMax)
Returns VolumeViz tile IJK box info for a specified voxel.
3D 8 Neighbors storage: values[0] is (0, 0, 0) values[1] is (1, 0, 0) values[2] is (0,...
VVIZ_DATATYPE values[8]
Defines voxel state info used with the VolumeViz Shader Library API.
VVIZ_DATATYPE value
Voxel value at texCoord position.
VVizTileInfo tileInfo
vec3 texCoord
Uniform data coordinates in volume space.