Picking tutorial 7

MeshViz Demonstrates simple picking in an interactive program.

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 6 but the selected faces are also removed from the skin displayed. That generates some holes in the skin where the faces are picked. It uses 2 MoCellShape instance: one instance for the skin representation and one for the selected faces drawn in blue. It uses also the SoField::connectFrom in order to share the cellIndices between both instances of MoCellShape.

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 cells are drawn in cyan. Number of picked faces is displayed in the console window.



SoPickedPoint, SoEventCallback, MoMesh, MoMeshSkin, MoMeshCellShape, MoFaceDetailI, MoMeshDetail, MoDrawStyle, MoMaterial


Open Inventor Toolkit reference manual, generated on 1 Nov 2022
Copyright © Thermo Fisher Scientific All rights reserved.