u-geometry 0.4.0

Domain-agnostic computational geometry: primitives, polygons, NFP, collision detection, spatial indexing.
Documentation
//! Domain-agnostic computational geometry library.
//!
//! Provides fundamental geometric primitives (2D and 3D), transformations,
//! polygon operations, collision detection, and spatial indexing.
//!
//! # Modules
//!
//! - **`primitives`**: Core types — `Point2`, `Vector2`, `Segment2`, `AABB2`,
//!   `Point3`, `Vector3`, `AABB3`
//! - **`polygon`**: Polygon operations — area, centroid, convex hull, winding
//! - **`transform`**: Rigid transformations — `Transform2D`, `Transform3D`
//! - **`robust`**: Numerically robust geometric predicates (Shewchuk)
//! - **`collision`**: collision detection — SAT for convex polygons, exact
//!   overlap for concave simple polygons (`polygons_intersect`), AABB overlap
//!   (2D and 3D)
//! - **`minkowski`**: Minkowski sum and NFP for convex polygons
//! - **`spatial_index`**: Linear-scan spatial indices for 2D and 3D AABB queries
//!
//! # Architecture
//!
//! This crate is a general-purpose geometry layer: it contains no
//! domain-specific concepts — nesting, packing, scheduling and the like are
//! defined by whatever consumes it.
//!
//! # References
//!
//! - de Berg, Cheong, van Kreveld, Overmars (2008), "Computational Geometry"
//! - Shewchuk (1997), "Adaptive Precision Floating-Point Arithmetic"
//! - O'Rourke (1998), "Computational Geometry in C"
//! - Ericson (2005), "Real-Time Collision Detection"

pub mod collision;
pub mod minkowski;
pub mod offset;
pub mod polygon;
pub mod primitives;
pub mod robust;
pub mod spatial_index;
pub mod transform;

#[cfg(feature = "wasm")]
pub mod wasm;

/// Re-exports of nalgebra types commonly used with this crate.
///
/// Consumers can import these directly instead of adding a separate
/// `nalgebra` dependency, ensuring version consistency across the ecosystem.
pub mod nalgebra_types {
    pub use nalgebra::{
        Isometry2, Isometry3, Point2 as NaPoint2, Point3 as NaPoint3, RealField, Rotation2,
        Rotation3, UnitQuaternion, Vector2 as NaVector2, Vector3 as NaVector3,
    };
}

// The README's Rust examples are the first code most users copy, so they are
// compiled and run with the doc-tests. Without this they were checked by
// nothing.
#[cfg(doctest)]
#[doc = include_str!("../README.md")]
pub struct ReadmeDoctests;