This program shows how to pick cells on a mesh representation and how to highlight and manage the list of picked faces on the skin.
This tutorial is similar to tutorial 8 but the cell id is drawn at the center of each selected faces. The cell id displayed is the id of the cell containing the selected faces. A new class MeshOfSelectedFaces is used to manage the list of selected faces. This class implement the MiSurfaceMeshUnstructured in which the MiSurfaceTopologyExplicitI::getCellName is implemented with the id of the volume cell that contain the selected face.
Note: the selected faces are drawn by using a MoMeshCellShape in order to shrink them and to display the id of node and selected cell. An simple MoMeshSurface could also be used to display the selected face as is.
Click on the viewer's arrow icon to switch from viewing mode to selection mode.
Move the mouse cursor over the mesh skin and click the left mouse button. Picked faces are drawn in cyan. Cell id and node ids of the picked faces are displayed in white.
SoPickedPoint, SoEventCallback, MoMesh, MoMeshSkin, MoMeshCellShape, MoFaceDetailI, MoMeshDetail, MoDrawStyle, MoMaterial, MiSurfaceMeshUnstructured, MeXSurfaceMeshUnstructured, MeXSurfaceCell, MiVolumeCell::getFacetCenter