If you don't find what you are looking for here, check the Mercury TGS Series website (3dviz.mc.com) as a more recent version of this FAQ may be posted there.
Documentation/Resources
PoPieChart3D *pieChart3D = new PoPieChart3D; pieChart3D->addPostRebuildCallback(pieChartRebuildCB, NULL); void pieChartRebuildCB(void *userData, PoBase *base) { PoPieChart3D *myPieChart = (PoPieChart3D *) base; // Retrieve the part named "slice". SoGroup *sliceGroup = (SoGroup*)myPieChart->getPart("slice", FALSE); if (sliceGroup) { SoFaceSet *firstSliceFaceSet = NULL; // Search the first SoFaceSet if it exists. for (int i = 0; i < sliceGroup->getNumChildren(); i++) { if (sliceGroup->getChild(i)->isOfType(SoFaceSet::getClassTypeId())) { firstSliceFaceSet = sliceGroup->getChild(i); break; } } if (firstSliceFaceSet) { // You can now work with the face set
// corresponding to the first slice } }
}

![]() |
PoLinearAxis {
fields [SFVec3f start, SFFloat end]
start 0 0 0
end 10
type XY
}
The main advantage of this format is, of course, the compact size. But
it is 

For 3D (or volume) meshes, you can define the following kinds of meshes:
Grid (or structured) mesh
In the case of picking of the skin, the coordinates of the picked point must be translated inside the mesh using the negative normal of the picked face of the skin (this normal can be retrieved with the getNormal() method of the class SoPickedPoint; see Chapter 10 “Handling Events and Selection” of The Inventor Mentor for more details about selection)
min is the minimum value of the values set.
max is the maximum value of the values set.
// Blue, Cyan, Green, Yellow and Red
SbColor colors[5] = { SbColor(0.0,0.0,1.0), SbColor(0.0,1.0,1.0),
SbColor(0.0,1.,0.), SbColor(1.0,1.0,0.0),
SbColor(1.0,0.0,0.0) };
PoNonLinearDataMapping2 *dataMapping = new PoNonLinearDataMapping2;
dataMapping->type = PoNonLinearDataMapping2::LINEAR_PER_LEVEL;
deltaValue = (max – min) / 4.0;
float val = min;
for (int i = 0; i < 5; val += deltaValue, i++) {
dataMapping->value.set1Value(i,val);
dataMapping->color.set1Value(i,colors[i]);
}
This graphic is the interpretation of the previous
code:// zn: data set for elevation. // num_x, num_y: size of the grid. // xmin,ymin, xmax,ymax: coordinates of the grid. PoRegularCartesianGrid2D *po_mesh = new PoRegularCartesianGrid2D; po_mesh->mesh.setGeometry(num_x,num_y, xmin,ymin, xmax,ymax); po_mesh->addValuesSet(0, zn);The second step consists of retrieving the Pbxxx mesh object stored in the node mesh and calling the method PbMesh::getFaultMesh() which builds a new triangle mesh where faults have been inserted.
// numFaultLines: number of fault lines. // faultLineSizes: the number of points of each fault line.
// faultLineCoords: the coordinates of each point of the fault lines. const PbMesh2D *mesh2D = (const PbMesh2D *)po_mesh->getMesh(); PbTriangleMesh2D *faultMesh =(PbTriangleMesh2D *) mesh2D->getFaultMesh(numFaultLines, faultLineSizes, faultLineCoords); PoTriangleMesh2D *po_faultMesh = new PoTriangleMesh2D; po_faultMesh->mesh.setValue(*faultMesh);
PoTriangleMesh2D *po_mesh = new PoTriangleMesh2D; po_mesh->setGeometry(. . .); PbMesh *mesh = po_mesh->getMesh();
SbBox3f box3f = mesh->getBoundingBox();