tiny.geometry
Overview · API · Code relationships · Verification · Audit
Overview
Collision geometry over f32: primitive shapes, closest points, intersection and sweep queries, indexed triangle meshes, and a static bounding volume hierarchy, with no allocation after a tree is built.
Definitions
Actions
Public operations.
FixedStorage: Storage with room forcapacitytriangles inline, for a caller that sizes its tree at compile time and keeps it in static memory.
Types and contracts
Public types and contracts.
Aabb: An axis-aligned box.Plane: The pointspwithnormal · p = offset.Storage: Caller-owned memory for one tree.Capsule: The points withinradiusof the segment fromatob.ErrorNode: A node box with its payload.Obb: A box rotated byaxes, whose columns are orthonormal, aroundcenter.Overlap: How many triangle indices an overlap query wrote, and whether those were all the triangles it touched.Ray: A half-line fromoriginalongdirection.RayHit: A ray meeting a mesh triangle: the ray parameter, the barycentric weights of verticesbandc, and the triangle index in the mesh.Segment: The pointsa + (b - a) * tfortin [0, 1].Stats: Work a query did, for comparing against its floor.SweepHit: A sweep's first contact with a mesh triangle, assweep.Hitreports it, with the triangle index in the mesh.Triangle: A triangle with counter-clockwise winding around its normal.SphereBvhMesh: A borrowed triangle list: triangleijoins the positions named byindices[3 i .. 3 i + 3].
Namespaces
Public namespaces.
tolerance: Every tolerance the package compares against, in one place.intersect: Ray casts and overlap tests between shapes.closest: Closest points between shapes, after Ericson, Real-Time Collision Detection, chapter 5.sweep: Swept shapes against triangles.
Values and defaults
Public values and defaults.
depth_limit: Every node sits at a depth below this, and every query stack holds this many entries.leaf_capacity: The most triangles one leaf holds.max_triangles: The most triangles a mesh may hold, so that every tree node index fits in au32.
Code relationships
Direct static dependencies extracted from parsed source by semantic graph analysis.
Uses: tiny.bench, tiny.hypothesis, tiny.linear
Used by: tiny.choir, tiny.sdfii
Verification
No verification records are cataloged for this module in this build.
Audit
| Evidence | Value |
|---|---|
| Source | lib/geometry/src/root.zig |
| Definitions | 22 of 25 documented |
| Members | 0 of 0 documented |
| Public names | 25 API, 113 indexed |
| Version | 26.7.0 |
| Revision | daab053ee433 |