Expand description
Low-level geometry primitives: Ray, AABB, Sphere, Plane, Triangle, Capsule, OrientedBox, Frustum, convex polyhedron, and barycentric coordinates.
Structs§
- Aabb3
- Axis-aligned bounding box in 3D.
- Barycentric
Coords - Barycentric coordinate utilities.
- Capsule3
- A 3D capsule: a swept sphere along a line segment.
- Frustum
- A view frustum defined by 6 planes: near, far, left, right, top, bottom.
- Oriented
Box - An oriented bounding box (OBB) defined by center, local axes, and half-extents.
- Plane3
- An infinite plane in 3D: n·x = d.
- Polyhedron
Convex - A convex polyhedron defined by vertices and face normals.
- Ray3
- A 3D ray with origin and (pre-normalized) direction.
- Sphere3
- A sphere in 3D defined by center and radius.
- Triangle3
- A 3D triangle with three vertices.
Functions§
- aabb_
from_ points - Build an AABB from a collection of points.
- closest_
point_ segment - Find the closest point on a line segment (a → b) to point
p. - closest_
point_ triangle - Find the closest point on a triangle to an external point
p. - frustum_
from_ vp - Build a frustum from a combined view-projection matrix (row-major, 4×4). Extracts the 6 Gribb-Hartmann planes.