ncollide3d/query/
mod.rs

1//! Non-persistent geometric queries.
2//!
3//! # General cases
4//! The most general methods provided by this module are:
5//!
6//! * [`query::closest_points()`] to compute the closest points between two shapes.
7//! * [`query::distance()`] to compute the distance between two shapes.
8//! * [`query::contact()`] to compute one pair of contact points between two shapes, including penetrating contact.
9//! * [`query::proximity()`] to determine if two shapes are intersecting or not.
10//! * [`query::time_of_impact()`] to determine when two shapes undergoing translational motions hit for the first time.
11//! * [`query::nonlinear_time_of_impact()`] to determine when two shapes undergoing continuous rigid motions hit for the first time.
12//!
13//! Ray-casting and point-projection can be achieved by importing traits:
14//!
15//! * [`query::RayCast`] for ray-casting.
16//! * [`query::PointQuery`] for point projection.
17//!
18//! # Specific cases
19//! All the other functions exported by this module are more specific versions of the ones described above.
20//! For example `distance_ball_ball` computes the distance between two shapes known at compile-time to be balls.
21//! They are less convenient to use than the most generic version but will be slightly faster due to the lack of dynamic dispatch.
22//! Generally, the specific functions have the form `[operation]_[shape1]_[shape2]()` where:
23//!
24//! * `[operation]` can be `closest_points`, `distance`, `contact`, `proximity` or `time_of_impact`.
25//! * `[shape1]` is the type of the first shape passed to the function, e.g., `ball`, or `plane`. Can also identify a trait implemented by supported shapes, e.g., `support_map`.
26//! * `[shape2]` is the type of the second shape passed to the function, e.g., `ball`, or `plane`. Can also identify a trait implemented by supported shapes, e.g., `support_map`.
27
28pub use self::closest_points::*;
29pub use self::contact::*;
30pub use self::distance::*;
31pub use self::error::*;
32pub use self::nonlinear_time_of_impact::*;
33pub use self::point::*;
34pub use self::proximity::*;
35pub use self::ray::*;
36pub use self::time_of_impact::*;
37pub use self::toi_dispatcher::*;
38
39pub mod algorithms;
40mod closest_points;
41mod contact;
42mod distance;
43mod error;
44mod nonlinear_time_of_impact;
45mod point;
46mod proximity;
47mod ray;
48mod time_of_impact;
49mod toi_dispatcher;
50pub mod visitors;