Geometric primitives and queries for rustsim.
This crate is intentionally tiny and dependency-free. It provides:
- [
Vec2] and [Vec3] type aliases over[f64; 2]and[f64; 3]with free-function arithmetic in the [vec2] and [vec3] modules. - Axis-aligned bounding boxes [
Aabb2], [Aabb3]. - Segments [
Segment2], [Segment3] with closest-point queries. - Rays [
Ray3] and planes [Plane3] with ray-plane intersection. - Triangles [
Triangle3] with closest-point and ray-triangle intersection (Möller–Trumbore). - Spheres [
Sphere3] with sphere-vs-AABB / sphere-vs-triangle tests.
All functions are f64. No unsafe. No external crates. No allocation
in hot paths.