1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Domain-agnostic computational geometry library.
//!
//! Provides fundamental geometric primitives (2D and 3D), transformations,
//! polygon operations, collision detection, and spatial indexing for the
//! U-Engine ecosystem.
//!
//! # 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`**: SAT-based collision detection (2D convex polygons), 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 sits at Layer 2 (Algorithms) in the U-Engine ecosystem.
//! It contains no domain-specific concepts — nesting, packing, scheduling, etc.
//! are all defined by consumers at higher layers.
//!
//! # 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"
/// 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.