Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
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.

FILES:

    • MeshVizXLM/mapping/Tutorial/Picking7/Main.cxx
    • MeshVizXLM/mapping/Tutorial/Picking7/TutorialPicking7.h
    • MeshVizXLM/mapping/Tutorial/Picking7/TutorialPicking7.cxx
    • MeshVizXLM/mapping/Tutorial/Demo.h
    • MeshVizXLM/mapping/Tutorial/Demo.cxx

SEE ALSO

SoPickedPoint SoEventCallback MoMesh MoMeshSkin MoMeshCellShape MoFaceDetailI MoMeshDetail MoDrawStyle MoMaterial

SCREENSHOT: