Expand description
Simple and fast TIN generation library. Uses Delaunay triangulation.
§Example
use delatin::{triangulate, Error};
let heights = vec![100.1, 123.4, 111.5, 121.4];
let width = 2;
let height = 2;
let max_error = Error(1.0);
// points `Vec<(usize, usize)>`: A vector containing all the vertices of the triangulated mesh. Each point corresponds to heights vector index.
// triangles `Vec<(usize, usize, usize)>`: A vector containing all the triangles of the mesh, each defined by indices into the `points`.
let (points, triangles) = triangulate(&heights, width, height, max_error)?;Structs§
- Error
- Error for the triangulation process.
Enums§
Functions§
- triangulate
- Runs the triangulation process until the maximum error is below the specified threshold.