tri-mesh
A triangle mesh data structure including basic operations.
Why another triangle mesh data structure crate you might ask.
Well, if you want a more feature complete crate than half_edge_mesh and a less generic crate than plexus,
then tri-mesh is probably something for you!
Examples
- Morph tool (and source code)
- Stitch tool (and source code)
Features
- The main struct Mesh implements the half-edge mesh data structure for easy and efficient traversal
- Half-edge walker to traverse the mesh
- Iterators over primitives (vertices, half-edges, edges, faces)
- Measures on vertices, edges and faces (e.g. position of vertex, area of face)
- Edit functionality (e.g. split edge, collapse edge, flip edge)
- Quality functionality (e.g. flip edges recursively to improve triangle quality, collapse small faces)
- Transformations affecting the vertex positions (e.g. moving a single vertex or rotate the entire mesh)
- Intersection functionality (e.g. face/ray intersection, edge/point intersection)
- Merge used for merging of entire meshes (e.g. append one mesh to another or merge overlapping primitives in a mesh)
- Split functionality (e.g. clone a subset of a mesh or split two meshes at their intersection)
- And more...
Please, see the documentation for more details.
Usage
Add the following to your Cargo.toml:
[]
= "0.3.0"
I have a mesh without normals, how can I use tri-mesh to compute them?
use *;
I need the bounding box of my mesh, how can I get that?
use *;
I want to stitch two meshes together, how do I do that?
use *;
How can I use tri-mesh to compute my own very special curvature measure?
use *;