Overview

Convention

Methods that manipulate the mesh use the suffix !, e.g., addvertex!.

Preconditions

Some methods have preconditions. For some preconditions, there are specific methods for testing.

Basic terminology

  • Handles identify mesh elements (vertices, faces, half-edges, and edges). Think of handles as "typed" indices with restrictions (no arithmetic).
  • Attributes store data with mesh elements. Think of an attribute are as an iterable sequence of data that enables direct ("indexed") access of individual items via handles. Each attribute has a (per mesh element) unique name.
  • Meshes encode connectivity of vertices, faces, half-edges, and edges (in "hidden" attributes) and store additional attributes. The user specified attributes are encoded in the mesh data type.
  • Geometry is encoded in user-specified attributes such as position or normal vectors.

Basic functionality

Meshes encode graphs that can be queried and manipulated. This includes

  • "global" iteration of (all) elements,
  • local navigation, e.g., from a source vertex via an edge to a destination vertex,
  • local iteration encodes typical "navigation patters", e.g., iterator direct neighbors of a vertex,
  • elements can be added or removed or otherwise manipulated such that the graph (the connectivity) changes,
  • attribute storage (including internal state) may suffer from "fragmentation" when manipulating the mesh: you may want to enforce a compact storage from time to time or prior to using data in external algorithms (e.g., apply linear operators to attributes),
  • meshes can be copied or converted in various ways, this includes means of file i/o.