Hide menu
Loading...
Searching...
No Matches
Mesh Exploration Example

Table of Contents

Explores triangulation, polylines and point sets inside a mesh.

Description

This example demonstrates how to explore Mesh mesh of a model: triangles, polylines, and point sets.

  1. The model is loaded using ModelData::ModelReader .
  2. For each ModelData::Part , its ModelData::Body are inspected.
  3. If a body is a ModelData::MeshBody , all its ModelData::MeshShape objects are traversed.
  4. Supported mesh shape types:

For each type, the example prints basic information: number of elements, vertex coordinates, indices, and normals (if available).

Part = "MESH"
MeshBody 0
MeshShape 0 IndexedTriangleSet type.
IndexedTriangleSet: 160 triangles:
Triangle 0:
Node 0: Vertex 0 (81.6497, 0, 0)
Node 1: Vertex 1 (40.8248, 0, 70.7107)
Node 2: Vertex 2 (0, 0, 0)
Triangle 1:
Node 0: Vertex 3 (40.8248, 66.6667, 23.5702)
Node 1: Vertex 1 (40.8248, 0, 70.7107)
Node 2: Vertex 0 (81.6497, 0, 0)
Triangle 2:
Node 0: Vertex 3 (40.8248, 66.6667, 23.5702)
Node 1: Vertex 2 (0, 0, 0)
Node 2: Vertex 1 (40.8248, 0, 70.7107)
...

Files