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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Collision detection algorithms for various geometric primitives
//!
//! This module provides implementations of collision detection algorithms
//! for common geometric primitives in 2D and 3D space. It supports both
//! discrete collision detection (testing if two objects intersect at a given
//! moment) and continuous collision detection (testing if two moving objects
//! will collide during a time interval).
//!
//! ## Features
//!
//! * Point collision tests with various shapes
//! * Line segment intersection tests
//! * Ray casting and intersection
//! * Collision detection between various geometric primitives
//! * Bounding volumes (spheres, axis-aligned bounding boxes)
//! * Continuous collision detection for moving objects
//!
//! ## Examples
//!
//! ### Testing if a point is inside a sphere
//!
//! ```
//! use scirs2_spatial::collision::{Sphere, point_sphere_collision};
//!
//! let sphere = Sphere {
//! center: [0.0, 0.0, 0.0],
//! radius: 2.0,
//! };
//!
//! let point = [1.0, 1.0, 1.0];
//! let inside = point_sphere_collision(&point, &sphere);
//!
//! println!("Is the point inside the sphere? {}", inside);
//! ```
//!
//! ### Testing if two circles collide
//!
//! ```
//! use scirs2_spatial::collision::{Circle, circle_circle_collision};
//!
//! let circle1 = Circle {
//! center: [0.0, 0.0],
//! radius: 2.0,
//! };
//!
//! let circle2 = Circle {
//! center: [3.0, 0.0],
//! radius: 1.5,
//! };
//!
//! let collide = circle_circle_collision(&circle1, &circle2);
//! println!("Do the circles collide? {}", collide);
//! ```
// Re-export all public items from submodules
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// Public modules
// Tests