1.4.6. 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:

These nodes can be used to render a slice of any shape, for example a cylindrical shape representing a well bore in a seismic visualization application. Note that volume geometry nodes can be used to render a large surface like a seismic horizon, but VolumeViz has a specific solution that is much more efficient for surfaces that be defined as a “height field” (single Z value for each XY position). This is explained in Section 1.6, “Height Field Rendering”.

The following code fragment shows the creation of an SoVolumeIndexedFaceSet( C++ | Java | .NET ) 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( C++ | Java | .NET ), 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 );

.NET
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

Figure 1.37. Volume geometry


See the example program in:

$OIVHOME/src/VolumeViz/examples/volumeGeometry

See the example program in:

$OIVHOME/demos/VolumeViz/sample/volumeGeometry