Open Inventor Release 2025.2.2
 
Loading...
Searching...
No Matches
Volume Geometry

The volume geometry nodes render an arbitrary set of oblique slices. The geometry of the slices is defined using classes called “volume geometry nodes” that are derived from the standard Open Inventor geometry nodes. The following classes are supported:

The following code fragment shows the creation of an SoVolumeIndexedFaceSet node (except for the definition of the actual vertices and indices). The process of creating a volume geometry node is the same as creating its parent class, in this case SoIndexedFaceSet, so we will not explain that here.

C++ :

SbVec3f vertices[16];
...
SoVertexProperty* pVertProp = new SoVertexProperty;
pVertProp->vertex.setValues( 0, 16, vertices );
pVertProp->orderedRGBA.setValue( 0xFFFFFFFF );
int ind[] = { 0, 8, ...};
SoVolumeIndexedFaceSet* pFaceSet = new SoVolumeIndexedFaceSet;
pFaceSet->vertexProperty = pVertProp;
pFaceSet->coordIndex.setValues( 0, 39, indices );

C# :

SbVec3f[] vertices = new SbVec3f[16];
...
SoVertexProperty VertProp = new SoVertexProperty();
VertProp.vertex.SetValues( 0, vertices );
VertProp.orderedRGBA.SetValue( 0xFFFFFFFF );
int[] ind = { 0, 8, ...};
SoVolumeIndexedFaceSet FaceSet = new SoVolumeIndexedFaceSet();
FaceSet.vertexProperty.Value = VertProp;
FaceSet.coordIndex.SetValues( 0, indices );

Java :

SbVec3f[] vertices = new SbVec3f[16];
...
SoVertexProperty vertProp = new SoVertexProperty();
vertProp.vertex.setValues( 0, vertices );
vertProp.orderedRGBA.setValue( 0xFFFFFFFF );
int[] ind = { 0, 8, ...};
SoVolumeIndexedFaceSet faceSet = new SoVolumeIndexedFaceSet();
faceSet.vertexProperty.setValue( vertProp );
faceSet.coordIndex.setValues( 0, indices );

Volume geometry

See the example program in:

C++ :

$OIVHOME/examples/source/VolumeViz/volumeGeometry

Java : See the example program in:

Java :

$OIVHOME/demos/VolumeViz/sample/volumeGeometry