MeVisLab Toolbox Reference
|
This document has the following sections:
The winged-edge data structure was proposed by Bruce G. Baumgart in 1975. It features nodes, edges, and faces, along with a dense pointer structure between incident primitives. With those links, a fast accessing of neighboring primitives is possible, although there is some overhead in space and time necessary (memory space and processing time, and sometimes programming time...).
The WEM libray uses this data structure for surface representation, and the modules for mesh processing avail themselves from the speed of accessing neighboring primitives.
All the three primitives, the WEMNode, the WEMEdge, and the WEMFace are derived from WEMPrimitive. This base class provides basic functionality for administration and maintenance. Notably, this base class stores the following:
Pointers to indicient primitives (like to the preceding and succeeding edges of the WEMEdge, or to all the incident faces of a WEMNode) are stored in the according primitives themselves.
The WEMNode holds the geometrical properties of the mesh. In here, a position and a normal is stored.
The WEMNode stores the pointer to its incident edges and faces in private arrays of the size WEM_MAX_VALENCE.
The pointers to edges and faces in these arrays do not have to be in any special order.
The WEMEdge plays a central role in the WEM, and the edge's pointer structure that gave name to the data structure. The edge is directed, having a head and a tail node. On base of this direction, the edge has a left and a right face (when 'looked from above', regarding the surface normals).
Since a valid winged-edge mesh is a 2-manifold, there must be a left and a right face. But in application, there can be holes or borders. In this case, one or both pointers to the edge's incident faces are NULL. The most of the processing modules take this into regard and handle borders accordingly. The SoWEMDiagnosis module would report such NULL faces at edges, but it can optionally be switched to ignore them.
For the most processing modules, the wing-pointers must be set. These are the left and the right preceding and succeeding edges, respectively. The terms 'preceding' and 'succeeding' for lPred
, lSucc
, rPred
and rSucc
refer to a clockwise by-pass around the edge's incident faces.
The WEMFace is a base class and there are three implementations: WEMTriangle, WEMQuad and WEMPolygon. This distinction has been made for efficiency reasons.
The nodes and edges have to be ordered in clockwise order. Note that the nodes and the edges of a face must be aligned. This means that the first node must be the head or the tail of the first edge, the second node must be the head or the tail of the second edge, and so on.
If all the primitives are put together, all their links have backlinks to the incident primitives.
A WEM consists of a number of WEMPatches. These can be of type WEMTrianglePatch, WEMQuadPatch, or WEMPolygonPatch. Different patch types can be part of a single WEM, but the faces in a patch must be of one type, the same as the patch type. For example, a WEMTrianglePatch must consist of WEMTriangles only, where a WEM can consist of a WEMTrianglePatch and a WEMQuadPatch.
Generally, there is only one patch per WEM. This is the case if a WEM has just been generated by the WEMIsoSurface module. However, for some algorithms it can be useful to compute per patch. The module WEMDemergePatches can demerge a WEM into a number of patches, based on a connected component analysis.
For each WEMPatch, a number of WEMPrimitiveValueLists (PVLs) can be established dynamically. These lists can store additional information on the nodes, edges, or faces and the stored values can be used for statistical investigation (WEMInfo) or for coloring the rendering (SoWEMRenderer, using it in LUT mode).
PVLs can optionally be made non-persistent (for the .wem format).