Expand description
§Spade
Delaunay triangulations for the rust ecosystem.
§Features
- A 2D Delaunay triangulation: DelaunayTriangulation
- Uses exact geometric predicate evaluation, preventing construction errors due to precision loss.
- A 2D constrained Delaunay triangulation: ConstrainedDelaunayTriangulation
- Supports vertex removal
- Serde support with the
serde
feature. no_std
support withdefault-features = false
- Natural neighbor interpolation: NaturalNeighbor
§Cargo features
These features are disabled by default and need to be enabled in your Cargo.toml
:
serde
: Enable (de)serialization of (constrained) Delaunay triangulations with the Serde cratemint
: Enables rudimentary mint interoperability by implementing theFrom
andInto
conversion traits betweenspade::Point2
andmint::Point2
. Also implements HasPosition formint::Point2
.
Re-exports§
pub use delaunay_core::HierarchyHintGeneratorWithBranchFactor;
Modules§
- handles
- Handle types used for traversal and modification of triangulations.
- internals
- Internals that must be published due to technical reasons. This is not the place you are looking for. A change to these items is not considered to be a breaking change.
- iterators
- Iterators over various elements of Delaunay triangulations.
Structs§
- Angle
Limit - Specifies the minimum allowed angle that should be kept after a refinement procedure.
- Barycentric
- Implements methods related to barycentric interpolation.
- CdtEdge
- Undirected edge type of a ConstrainedDelaunayTriangulation (CDT).
- Constrained
Delaunay Triangulation - A two-dimensional constrained Delaunay triangulation.
- Delaunay
Triangulation - A two-dimensional Delaunay triangulation.
- Last
Used Vertex Hint Generator - A hint generator that returns the last used vertex as hint.
- Line
Intersection Iterator - An iterator over all intersections of a straight line across the triangulation.
- Line
Side Info - Describes on which side of a line a point lies.
- Natural
Neighbor - Implements methods for natural neighbor interpolation.
- Point2
- A two-dimensional point.
- Point
Projection - Indicates a point’s projected position relative to an edge.
- Refinement
Parameters - Controls how Delaunay refinement is performed.
- Refinement
Result - Contains details about the outcome of a refinement procedure.
Enums§
- Insertion
Error - The error type used for inserting elements into a triangulation.
- Intersection
- An intersection that can occur when moving through a triangulation along a straight line.
- Position
InTriangulation - Describes a position in a triangulation.
Constants§
- MAX_
ALLOWED_ VALUE - The largest allowed coordinate value that can be inserted into Delaunay triangulations. This value is equal to 2201.
- MIN_
ALLOWED_ VALUE - The smallest allowed coordinate value greater than zero that can be inserted into Delaunay triangulations. This value is equal to 2-142.
Traits§
- Float
Triangulation - Implements general functions for triangulations over floating point data types.
- HasPosition
- An object with a position.
- Hint
Generator - A structure used to speed up common operations on delaunay triangulations like insertion and geometry queries by providing hints on where to start searching for elements.
- Spade
Num - A coordinate type that can be used with a triangulation.
- Triangulation
- Defines common operations on triangulations.
Functions§
- mitigate_
underflow - Prevents underflow issues of a position by setting any coordinate that is too small to zero.
- validate_
coordinate - Checks if a coordinate value is suitable for insertion into a Delaunay triangulation.
- validate_
vertex - Checks if a vertex is suitable for insertion into a Delaunay triangulation.
Type Aliases§
- Hierarchy
Hint Generator - A hint generator based on a hierarchy of triangulations optimized for randomly accessing elements of the triangulation.