| Crates.io | mesh-graph |
| lib.rs | mesh-graph |
| version | 0.2.2 |
| created_at | 2025-05-15 04:39:00.505055+00 |
| updated_at | 2025-08-22 22:12:31.056365+00 |
| description | Fast halfedge triangle mesh graph in pure Rust |
| homepage | |
| repository | https://github.com/Synphonyte/mesh-graph |
| max_upload_size | |
| id | 1674378 |
| size | 725,987 |
MeshGraph is a halfedge data structure for representing triangle meshes. It uses parry3d's Qbvh to implement some of parry3d's spatial queries. It also uses slotmap to manage the graph nodes.
This is heavily inspired by SMesh and OpenMesh.
bevy Cargo featurererun Cargo feature to enable the Rerun integrationuse mesh_graph::{MeshGraph, primitives::IcoSphere};
// Create a new mesh
let mesh_graph = MeshGraph::from(IcoSphere { radius: 10.0, subdivisions: 2 });
// Get some vertex ID and its vertex node
let (vertex_id, vertex) = mesh_graph.vertices.iter().next().unwrap();
// Iterate over all outgoing halfedges of the vertex
for halfedge_id in vertex.outgoing_halfedges(&mesh_graph) {
// do sth
}
// Get the position of the vertex
let position = mesh_graph.positions[vertex_id];
Check out the crate freestyle-sculpt for a heavy duty example.