Mesh¶
A Mesh is a data structure that represents a triangulated surface.
A structure of a mesh includes:
- vertices (red) - triangle points, each defined by a 3D coordinate;
- faces (green) - triangles formed from available vertices, defined by vertex indices (for example f1 is defined by vertices v1, v2, v5);
- halfedges (blue) - directed edges, each defined by a vertex it points to and a face to which it belongs (for example he1 is defined by vertex v1 and face f1). In other words, when some property is assigned to a halfedge, it’s assigned to a corresponding vertex of a corresponding face.
Each triangle is expected to have a counterclockwise winding order. If a mesh that doesn’t satisfy this condition is loaded, the program will either try to re-orient the triangles or - if that’s not possible - it will duplicate them.
An optional list of properties includes:
- face normals - normal assigned to each face;
- face labels - label assigned to each face;
- vertex normals - normal assigned to each vertex;
- vertex colors - color assigned to each vertex;
- vertex texture coordinates - coordinates assigned to each vertex for a look-up in a 2D texture map attached to the mesh;
- vertex labels - label assigned to each vertex;
- halfedge normals - normal assigned to each halfedge;
- halfedge colors - color assigned to each halfedge;
- halfedge texture coordinates - coordinates assigned to each halfedge for a look-up in a 2D texture map attached to the mesh.
See tutorial video on how to work with meshes here
Annotation¶
Mesh annotation belongs to a special data annotation. When a mesh is created/loaded, its annotation will show up in the 3D view. Besides the algorithms, there are several ways to manipulate the mesh data or change its annotation visualization:
- Context menu
- Mesh Display Options
- Mesh Data Controller
Mesh Display Options¶
Mesh Display Options is a data component that allows configuring advanced rendering options. To open, right-click on mesh in the annotation widget, select Inspect Properties -> MeshDisplayOptions.
Mesh Data Controller¶
Depending on the current setting this controller can be either detached, or located in a toolbar, a primary or a secondary dock.
Available options can be split into following categories:
Visualization:
- Render Mode:
Surface
,Wireframe
orSurface + Wireframe
(described earlier). - Material Mode:
Uniform
,Color
,Texture
,Shader
,Face Label
,Vertex Label
(described earlier). - Lighting:
on
oroff
for both, front and back side of a mesh. - Triangle Normals: if
on
, mesh surface will be rendered using face normals instead of vertex normals.
- Render Mode:
Mesh Manipulator
- Translate: adds a manipulator for translating the mesh (this changes transformation matrix of the mesh).
- Rotate: adds a manipulator for rotating the mesh (this changes transformation matrix of the mesh).
Mesh Info Overlay (View Mesh Info). Shows selected information as a text overlay in the left corner of the 3D View. Available options are:
Triangle info
. Displays all available information that a particular triangle has: face index, face normal, face label, 3 vertex indices, 3 vertex positions, 3 vertex normals, 3 vertex colors, 3 vertex texture coordinates, 3 vertex labels, 3 halfedge normals, 3 halfedge colors, 3 halfedge texture coordinates.Vertex info
. Displays all available information that a particular vertex has: index, position, normal, color, label.Edge info
. Displays all available information that a particular edge has: face index, 2 vertex indices, 2 vertex positions, 2 halfedge normals, 2 halfedge colors, 2 halfedge texture coordinates.Show holes
. Displays a contour of the boundary faces.Show non-manifold vertices
. Displays non-manifold vertices. These are vertices that are either known to have duplicates, or if more than one gap exists, i.e. more than one outgoing boundary halfedge.