Skip to main content

mathverse_geometry/
lib.rs

1//! Geometry: 2D and 3D shapes, measures, transforms, distances, intersections.
2//!
3//! All values are `f64`. Constructors panic on invalid shapes
4//! (e.g. negative radius); this is a documented programmer-error contract,
5//! mirroring `nalgebra` style.
6
7pub mod shapes2d;
8pub mod shapes3d;
9pub mod primitives2d;
10pub mod spatial;
11pub mod intersection;
12pub mod distance;
13pub mod transforms;
14pub mod metrics;
15pub mod mesh3d;
16
17// Re-export core types
18pub use shapes2d::{Circle, Ellipse, Point2, Polygon, Rectangle, Triangle};
19pub use shapes3d::{Cone, Cube, Cylinder, Line3, Plane, Point3, Sphere};
20
21// Re-export 2D primitives
22pub use primitives2d::{Arc, BezierCurve, CircularSegment, LineSegment2, Polyline, Ray2, Sector};
23
24// Re-export spatial structures
25pub use spatial::{AABB, AABB3, Frustum, OBB, Octree, Quadtree};
26
27// Re-export triangle mesh and tree
28pub use mesh3d::{AABBTreeNode, Triangle3, TriangleMesh};
29
30// Re-export Transform2D trait
31pub use transforms::Transform2D;