parry3d_f64/query/
mod.rs

1//! Non-persistent geometric queries.
2//!
3//! # General cases
4//! The most general methods provided by this module are:
5//!
6//! * [`closest_points()`] to compute the closest points between two shapes.
7//! * [`distance()`] to compute the distance between two shapes.
8//! * [`contact()`] to compute one pair of contact points between two shapes, including penetrating contact.
9//! * [`intersection_test()`] to determine if two shapes are intersecting or not.
10//! * [`cast_shapes()`] to determine when two shapes undergoing translational motions hit for the first time.
11//! * [`cast_shapes_nonlinear()`] 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//! * [`RayCast`] for ray-casting.
16//! * [`PointQuery`] for point projection.
17//!
18//! # Specific cases
19//! The functions exported by the `details` submodule 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//! The specific functions have the form `[operation]_[shape1]_[shape2]()` where:
23//!
24//! * `[operation]` can be `closest_points`, `distance`, `contact`, `intersection_test` or `time_of_impact`.
25//! * `[shape1]` is the type of the first shape passed to the function, e.g., `ball`, or `halfspace`. 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 `halfspace`. Can also identify a trait implemented by supported shapes, e.g., `support_map`.
27
28pub use self::closest_points::{closest_points, ClosestPoints};
29pub use self::contact::{contact, Contact};
30#[cfg(feature = "alloc")]
31pub use self::contact_manifolds::{
32    ContactManifold, ContactManifoldsWorkspace, TrackedContact, TypedWorkspaceData, WorkspaceData,
33};
34pub use self::default_query_dispatcher::DefaultQueryDispatcher;
35pub use self::distance::distance;
36pub use self::error::Unsupported;
37pub use self::intersection_test::intersection_test;
38pub use self::nonlinear_shape_cast::{cast_shapes_nonlinear, NonlinearRigidMotion};
39pub use self::point::{PointProjection, PointQuery, PointQueryWithLocation};
40#[cfg(feature = "alloc")]
41pub use self::query_dispatcher::PersistentQueryDispatcher;
42pub use self::query_dispatcher::{QueryDispatcher, QueryDispatcherChain};
43pub use self::ray::{Ray, RayCast, RayIntersection, SimdRay};
44pub use self::shape_cast::{cast_shapes, ShapeCastHit, ShapeCastOptions, ShapeCastStatus};
45pub use self::split::{IntersectResult, SplitResult};
46
47mod clip;
48pub mod closest_points;
49pub mod contact;
50#[cfg(feature = "alloc")]
51mod contact_manifolds;
52mod default_query_dispatcher;
53mod distance;
54#[cfg(feature = "alloc")]
55pub mod epa;
56mod error;
57pub mod gjk;
58mod intersection_test;
59mod nonlinear_shape_cast;
60pub mod point;
61mod query_dispatcher;
62mod ray;
63pub mod sat;
64mod shape_cast;
65mod split;
66#[cfg(feature = "alloc")]
67pub mod visitors;
68
69/// Queries dedicated to specific pairs of shapes.
70pub mod details {
71    pub use super::clip::*;
72    pub use super::closest_points::*;
73    pub use super::contact::*;
74    #[cfg(feature = "alloc")]
75    pub use super::contact_manifolds::*;
76    pub use super::distance::*;
77    pub use super::intersection_test::*;
78    pub use super::nonlinear_shape_cast::*;
79    pub use super::point::*;
80    pub use super::ray::*;
81    pub use super::shape_cast::*;
82}