Expand description
Triangle mesh operations: normals, volume, surface area, point containment.
Structs§
- TriMesh
- A simple triangle mesh.
Functions§
- compute_
adjacency - Build a vertex-to-vertex adjacency list from a triangle mesh.
- compute_
face_ normals - Compute a unit normal for every triangle in the mesh.
- compute_
genus - Compute the genus of a closed orientable triangulated surface via the
Euler characteristic:
χ = V - E + F = 2 - 2g. - compute_
vertex_ normals - Compute per-vertex normals using area-weighted averaging of adjacent face normals.
- edge_
length_ stats - Compute mesh statistics: min/max/average edge length.
- find_
boundary_ edges - Find all boundary edges: edges shared by exactly one triangle.
- is_
watertight - Return
trueif the mesh is watertight (every edge is shared by exactly two faces). - laplacian_
smooth - Apply
iterationspasses of Laplacian smoothing toverts. - merge_
meshes - Merge two meshes (verts + tris) into one by concatenating vertices and offsetting triangle indices of the second mesh.
- quadric_
decimate - Quadric Error Metrics (QEM) mesh decimation.
- split_
edge - Split edge
(v0, v1)in the mesh by inserting a midpoint vertex. - triangulate_
polygon - Triangulate a simple convex or concave planar polygon using ear clipping.
- vertex_
cluster_ simplify - Cluster vertices into a grid of
grid_res × grid_res × grid_rescells. - weld_
vertices - Merge vertices that are closer than
tolinto a single representative vertex.
Type Aliases§
- Triangle
- Vertex indices for a triangle.