Expand description
Geometry: 2D and 3D shapes, measures, transforms, distances, intersections.
All values are f64. Constructors panic on invalid shapes
(e.g. negative radius); this is a documented programmer-error contract,
mirroring nalgebra style.
§Errors
Use error::GeometryError for recoverable failures.
Re-exports§
pub use shapes2d::Circle;pub use shapes2d::Ellipse;pub use shapes2d::Point2;pub use shapes2d::Polygon;pub use shapes2d::Rectangle;pub use shapes2d::Triangle;pub use shapes3d::Cone;pub use shapes3d::Cube;pub use shapes3d::Cylinder;pub use shapes3d::Line3;pub use shapes3d::Plane;pub use shapes3d::Point3;pub use shapes3d::Sphere;pub use primitives2d::Arc;pub use primitives2d::BezierCurve;pub use primitives2d::CircularSegment;pub use primitives2d::LineSegment2;pub use primitives2d::Polyline;pub use primitives2d::Ray2;pub use primitives2d::Sector;pub use spatial::AABB;pub use spatial::AABB3;pub use spatial::Frustum;pub use spatial::OBB;pub use spatial::Octree;pub use spatial::Quadtree;pub use mesh3d::AABBTreeNode;pub use mesh3d::Triangle3;pub use mesh3d::TriangleMesh;pub use transforms::Transform2D;
Modules§
- distance
- Distance and proximity: point-segment, point-line, point-polygon, closest points, GJK distance.
- error
- Centralized error types for
mathverse-geometry. - intersection
- Collision and intersection: point-in-polygon, segment-polygon, circle-polygon, polygon-polygon (SAT), convex hull, convexity test.
- mesh3d
- 3D extensions: triangle mesh, AABB tree, ray-triangle (Möller-Trumbore), plane-plane intersection, line-solid intersections.
- metrics
- Geometry metrics: angle between lines, cross product area, signed area, winding number, moment of inertia.
- primitives2d
- 2D primitives: line segment, ray, arc, sector, circular segment, polyline, Bézier curve.
- shapes2d
- 2D shapes: point, circle, triangle, rectangle, polygon, ellipse.
- shapes3d
- 3D shapes: point, sphere, cube, cylinder, cone, plane, line.
- spatial
- Spatial structures: axis-aligned bounding box, oriented bounding box, quadtree, octree, frustum.
- transforms
- Shape transforms: rotation, scaling, translation for 2D shapes.