Skip to main content

Module spatial

Module spatial 

Source

Modules§

barycentric
Barycentric and mean-value coordinates, for interpolating values given at the corners of a triangle, a tetrahedron, a polygon or a closed triangle mesh (#143).
bvh
Deterministic median-split bounding-volume hierarchy.
index
Zero-allocation spatial index query contract.
points
Nearest-neighbour and radius queries over point sets.

Structs§

Bvh
Immutable median-split AABB hierarchy over opaque caller keys.
CandidatePair
One conservative pair emitted by a broad-phase query.
NearestCandidate
Nearest accepted key according to AABB lower-bound distance.
PairCandidates
Deterministically ordered conservative pair candidates plus execution cost.
PointHit
A point found by a query, with its exact distance.
PointIndex
A uniform-grid index over a point set.
RayHit
Ray hit returned in ascending distance order where supported.
SpatialItem
Key and bounds supplied to an index builder.
SpatialQueryStats
Observable cost counters for an allocating candidate-pair query.

Enums§

BarycentricError
Why coordinates could not be computed.
PointQueryError
Why a query could not be answered.

Traits§

SpatialIndex
Read-only broad-phase query API. Callback visitation avoids allocating a result vector for large clash batches.

Functions§

discrete_harmonic_coordinates2
Discrete harmonic coordinates of point in a strictly convex polygon, one weight per vertex (Pinkall and Polthier’s cotangent weights, applied to the triangle fan (point, v_i, v_{i+1}); Floater’s survey calls this scheme “discrete harmonic”).
mean_value_coordinates2
Mean-value coordinates of point in a simple polygon, one weight per vertex (Floater 2003, in the form for arbitrary polygons of Hormann and Floater 2006).
mean_value_coordinates3
Mean-value coordinates of point in a closed triangle mesh, one weight per vertex (Floater, Kos and Reimers 2005).
tetrahedron_barycentric
Barycentric coordinates of point in a tetrahedron, as weights of its four corners in order.
triangle_barycentric2
Barycentric coordinates of point in a 2D triangle, as weights of a, b and c.
triangle_barycentric3
Barycentric coordinates of point in a 3D triangle, as weights of a, b and c.
wachspress_coordinates2
Wachspress coordinates of point in a strictly convex polygon, one weight per vertex (Wachspress 1975, in the determinant form of Meyer, Lee, Barr and Desbrun 2002).