Expand description
Non-persistent geometric queries.
§General cases
The most general methods provided by this module are:
closest_points()to compute the closest points between two shapes.distance()to compute the distance between two shapes.contact()to compute one pair of contact points between two shapes, including penetrating contact.intersection_test()to determine if two shapes are intersecting or not.cast_shapes()to determine when two shapes undergoing translational motions hit for the first time.cast_shapes_nonlinear()to determine when two shapes undergoing continuous rigid motions hit for the first time.
Ray-casting and point-projection can be achieved by importing traits:
RayCastfor ray-casting.PointQueryfor point projection.
§Specific cases
The functions exported by the details submodule are more specific versions of the ones described above.
For example distance_ball_ball computes the distance between two shapes known at compile-time to be balls.
They are less convenient to use than the most generic version but will be slightly faster due to the lack of dynamic dispatch.
The specific functions have the form [operation]_[shape1]_[shape2]() where:
[operation]can beclosest_points,distance,contact,intersection_testortime_of_impact.[shape1]is the type of the first shape passed to the function, e.g.,ball, orhalfspace. Can also identify a trait implemented by supported shapes, e.g.,support_map.[shape2]is the type of the second shape passed to the function, e.g.,ball, orhalfspace. Can also identify a trait implemented by supported shapes, e.g.,support_map.
Re-exports§
pub use self::closest_points::closest_points;pub use self::closest_points::ClosestPoints;pub use self::contact::contact;pub use self::contact::Contact;pub use self::point::PointProjection;pub use self::point::PointQuery;pub use self::point::PointQueryWithLocation;
Modules§
- closest_
points - Implementation details of the
closest_pointsfunction. - contact
- Implementation details of the
contactandcontactsfunctions. - details
- Queries dedicated to specific pairs of shapes.
- epa
- Expanding Polytope Algorithm (EPA) for computing penetration depth and contact information.
- gjk
- The GJK algorithm for distance computation.
- point
- Point inclusion and projection.
- sat
- Application of the Separating Axis Theorem (SAT) for collision detection.
Structs§
- Contact
Manifold - A contact manifold between two shapes.
- Contact
Manifolds Workspace - A serializable workspace used by some contact-manifolds computation algorithms.
- Default
Query Dispatcher - The default query dispatcher implementation provided by Parry.
- Nonlinear
Rigid Motion - Describes the complete motion of a rigid body with both translation and rotation.
- Query
Dispatcher Chain - A chain of two query dispatchers that provides fallback behavior.
- Ray
- A ray for ray-casting queries.
- RayIntersection
- Result of a successful ray cast against a shape.
- Shape
Cast Hit - The result of a shape casting..
- Shape
Cast Options - Configuration for controlling the behavior of time-of-impact (i.e. shape-casting) calculations.
- SimdRay
- A structure representing 4 rays in an SIMD SoA fashion.
- Tracked
Contact - A single contact point between two shapes.
- Unsupported
- Error indicating that a geometric query is not supported between certain shape combinations.
Enums§
- Intersect
Result - The result of a plane-intersection operation.
- Shape
Cast Status - The status of the time-of-impact computation algorithm.
- Split
Result - The result of a plane-splitting operation.
- Typed
Workspace Data - Enum representing workspace data of a specific type.
Traits§
- Persistent
Query Dispatcher - A query dispatcher for queries relying on spatial coherence, including contact-manifold computation.
- Query
Dispatcher - Dispatcher for pairwise geometric queries between shapes.
- RayCast
- Traits of objects which can be transformed and tested for intersection with a ray.
- Workspace
Data - Data from a
ContactManifoldsWorkspace.
Functions§
- cast_
shapes - Computes when two moving shapes will collide (shape casting / swept collision detection).
- cast_
shapes_ nonlinear - Computes when two shapes moving with translation and rotation will first collide.
- distance
- Computes the minimum distance separating two shapes.
- intersection_
test - Tests whether two shapes are intersecting (overlapping).