OpenMesh: Features and Goals of OpenMesh

| OpenMesh

Features and Goals of OpenMesh

The main features of the underlying data structure are:

- No restriction to triangles meshes, handle general polygonal meshes.
- Explicit representation of vertices, halfedges, edges, and faces.
- Efficient access to the one-ring neighborhood of a vertex.
- Ability to handle non-manifold vertices (like two faces meeting in only one vertex).

The goals/features of the C++ implementation are:

- Flexibility:
  - Choose suitable types for scalars and coordinates (e.g. float, double, exact arithmetic and two-, three-, or n-dimensional points).
  - Enhance each item type by your own attributes/properties, like e.g. adding a normal vector or a `FaceHandle` to class `Vertex`.
- Efficiency:
  - Avoid the overhead of virtual inheritance and virtual function calls.
  - Resolve as many type/attribute dependencies as possible at compile-time instead of testing for attributes at run-time (e.g. normal vectors for faces).

- Type-safety for handles, no type-casting (*): Vertices, (Half-)Edges, Faces know each other and their corresponding handles.

  (*) Since version 0.10.0 the Microsoft VisualC++ compiler is supported. Due to the compilers inaptitude to process forwards on template functions correctly, the type-safety had to be given up to some extend. Though under the hood void pointers are used, the casting is done within the mesh, and the user transparently uses his handles as before.
  As soon as the compiler adheres to the C++ standard the type-safe version will be restored.