Skip to main content

Crate fast_mesh

Crate fast_mesh 

Source
Expand description

Fast triangle mesh utilities.

Meshes use flat buffers, the same layout as WebGL / three.js BufferGeometry:

  • positions: [x0, y0, z0, x1, y1, z1, ...], length = vertex count × 3
  • indices: [a0, b0, c0, a1, b1, c1, ...], length = triangle count × 3

This crate has no WebAssembly dependencies so it can be tested natively and reused from plain Rust. The JS bindings live in fast-mesh-wasm.

Structs§

Aabb
Axis-aligned bounding box.

Enums§

MeshError
Errors returned when input buffers do not describe a valid triangle mesh.

Functions§

compute_bounds
Computes the axis-aligned bounding box of all vertices.
compute_vertex_normals
Computes smooth per-vertex normals.