Crate tri_mesh

source ·
Expand description

This crate contains a Mesh struct which represents a triangle mesh. It is implemented using a half-edge data structure which is efficient for creating, editing, traversing and computing on that mesh. Also, the mesh can easily be created from and exported into a format that is efficient for visualization. Finally, operations on the mesh is implemented as methods on the Mesh struct, so take a look at that rather long list of methods for a complete overview.


pub use crate::math::*;


Linear algebra types for vector calculations. Basically re-export the cgmath library.


A bounding box that aligns with the x, y and z axes.
An iterator over the edges created by Mesh::edge_iter.
An iterator over the three half-edges in a face created by Mesh::face_halfedge_iter.
A unique ID for a face.
A unique ID for a halfedge.
A representation of a triangle mesh which is efficient for calculating on and making changes to a mesh.
An iterator over the half-edges starting in a given vertex created by Mesh::vertex_halfedge_iter.
A unique ID for a vertex.
Used for easy and efficient traversal of the mesh. Also see Connectivity for common connectivity utility functionality.


Error when performing a mesh operation
An enum describing the types of intersections.
An enum describing the types of primitives.


A unique ID.

Type Definitions

An iterator over the faces created by Mesh::face_iter.
An iterator over the half-edges created by Mesh::halfedge_iter.
An iterator over the vertices created by Mesh::vertex_iter.