Expand description
Non-persistent geometric queries.
§General cases
The most general methods provided by this module are:
- [
query::closest_points()
] to compute the closest points between two shapes. - [
query::distance()
] to compute the distance between two shapes. - [
query::contact()
] to compute one pair of contact points between two shapes, including penetrating contact. - [
query::proximity()
] to determine if two shapes are intersecting or not. - [
query::time_of_impact()
] to determine when two shapes undergoing translational motions hit for the first time. - [
query::nonlinear_time_of_impact()
] 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:
- [
query::RayCast
] for ray-casting. - [
query::PointQuery
] for point projection.
§Specific cases
All the other functions exported by this module 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.
Generally, the specific functions have the form [operation]_[shape1]_[shape2]()
where:
[operation]
can beclosest_points
,distance
,contact
,proximity
ortime_of_impact
.[shape1]
is the type of the first shape passed to the function, e.g.,ball
, orplane
. 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
, orplane
. Can also identify a trait implemented by supported shapes, e.g.,support_map
.
Modules§
- algorithms
- Algorithms needed for distance and penetration depth computation.
- visitors
- Visitors for performing geometric queries exploiting spatial partitioning data structures.
Structs§
- Chain
- The composition of two dispatchers
- Contact
- Geometric description of a contact.
- Contact
Id - A contact identifier which is unique within a contact manifold.
- Contact
Kinematic - Local contact kinematic of a pair of solids around two given points.
- Contact
Manifold - A contact manifold.
- Contact
Prediction - The prediction parameters for contact determination.
- DefaultTOI
Dispatcher - A dispatcher that exposes built-in queries
- Local
Shape Approximation - The approximation of a shape on the neighborhood of a point.
- Point
Projection - Description of the projection of a point on a shape.
- Ray
- A Ray.
- RayIntersection
- Structure containing the result of a successful ray cast.
- TOI
- The result of a time-of-impact (TOI) computation.
- Tracked
Contact - A contact combined with contact kinematic information as well as a persistent identifier.
- Unsupported
- Error indicating that a query is not supported between certain shapes
Enums§
- Closest
Points - Closest points information.
- Contact
Tracking Mode - The technique used for contact tracking.
- Neighborhood
Geometry - A shape geometry type at the neighborhood of a point.
- Proximity
- Proximity information.
- TOIStatus
- The status of the time-of-impact computation algorithm.
Traits§
- Contact
Preprocessor - Pre-process a contact before it is added to a contact manifold.
- Point
Query - Trait of objects that can be tested for point inclusion and projection.
- Point
Query With Location - Returns shape-specific info in addition to generic projection information
- RayCast
- Traits of objects which can be transformed and tested for intersection with a ray.
- TOIDispatcher
- Dispatcher for time-of-impact queries
Functions§
- closest_
points - Computes the pair of closest points between two shapes.
- closest_
points_ ball_ ball - Proximity between balls.
- closest_
points_ composite_ shape_ shape - Closest points between a composite shape and any other shape.
- closest_
points_ line_ line - Closest points between two segments.
- closest_
points_ line_ line_ parameters - Closest points between two lines.
- closest_
points_ line_ line_ parameters_ eps - Closest points between two lines with a custom tolerance epsilon.
- closest_
points_ plane_ support_ map - Closest points between a plane and a support-mapped shape (Cuboid, ConvexHull, etc.)
- closest_
points_ segment_ segment - Closest points between segments.
- closest_
points_ segment_ segment_ with_ locations - Closest points between two segments.
- closest_
points_ segment_ segment_ with_ locations_ nD - Segment-segment closest points computation in an arbitrary dimension.
- closest_
points_ segment_ segment_ with_ locations_ nD_ eps - Segment-segment closest points computation in an arbitrary dimension.
- closest_
points_ shape_ composite_ shape - Closest points between a shape and a composite shape.
- closest_
points_ support_ map_ plane - Closest points between a support-mapped shape (Cuboid, ConvexHull, etc.) and a plane.
- closest_
points_ support_ map_ support_ map - Closest points between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - closest_
points_ support_ map_ support_ map_ with_ params - Closest points between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - contact
- Computes one contact point between two shapes.
- contact_
ball_ ball - Contact between balls.
- contact_
ball_ convex_ polyhedron - Contact between a ball and a convex polyhedron.
- contact_
composite_ shape_ shape - Best contact between a composite shape (
Mesh
,Compound
) and any other shape. - contact_
convex_ polyhedron_ ball - Contact between a convex polyhedron and a ball.
- contact_
plane_ support_ map - Contact between a plane and a support-mapped shape (Cuboid, ConvexHull, etc.)
- contact_
shape_ composite_ shape - Best contact between a shape and a composite (
Mesh
,Compound
) shape. - contact_
support_ map_ plane - Contact between a support-mapped shape (Cuboid, ConvexHull, etc.) and a plane.
- contact_
support_ map_ support_ map - Contact between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - contact_
support_ map_ support_ map_ with_ params - Contact between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - distance
- Computes the minimum distance separating two shapes.
- distance_
ball_ ball - Distance between balls.
- distance_
composite_ shape_ shape - Smallest distance between a composite shape and any other shape.
- distance_
plane_ support_ map - Distance between a plane and a support-mapped shape.
- distance_
shape_ composite_ shape - Smallest distance between a shape and a composite shape.
- distance_
support_ map_ plane - Distance between a support-mapped shape and a plane.
- distance_
support_ map_ support_ map - Distance between support-mapped shapes.
- distance_
support_ map_ support_ map_ with_ params - Distance between support-mapped shapes.
- line_
toi_ with_ plane - Computes the toi of an unbounded line with a plane described by its center and normal.
- nonlinear_
time_ of_ impact - Computes the smallest time of impact of two shapes under translational movement.
- nonlinear_
time_ of_ impact_ ball_ ball - Non-linear Time Of Impact of two balls under a rigid motion (translation + rotation).
- nonlinear_
time_ of_ impact_ composite_ shape_ shape - Time Of Impact of a composite shape with any other shape, under a rigid motion (translation + rotation).
- nonlinear_
time_ of_ impact_ shape_ composite_ shape - Time Of Impact of any shape with a composite shape, under a rigid motion (translation + rotation).
- nonlinear_
time_ of_ impact_ support_ map_ support_ map - Time of impacts between two support-mapped shapes under a rigid motion.
- nonlinear_
time_ of_ impact_ support_ map_ support_ map_ with_ closest_ points_ function - Time of impacts between two support-mapped shapes under a rigid motion.
- point_
projection_ on_ support_ map - Projects a point on a shape using the GJK algorithm.
- proximity
- Tests whether two shapes are in intersecting or separated by a distance smaller than
margin
. - proximity_
ball_ ball - Proximity between balls.
- proximity_
composite_ shape_ shape - Proximity between a composite shape (
Mesh
,Compound
) and any other shape. - proximity_
plane_ support_ map - Proximity between a plane and a support-mapped shape (Cuboid, ConvexHull, etc.)
- proximity_
shape_ composite_ shape - Proximity between a shape and a composite (
Mesh
,Compound
) shape. - proximity_
support_ map_ plane - Proximity between a support-mapped shape (Cuboid, ConvexHull, etc.) and a plane.
- proximity_
support_ map_ support_ map - Proximity between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - proximity_
support_ map_ support_ map_ with_ params - Proximity between support-mapped shapes (
Cuboid
,ConvexHull
, etc.) - ray_
intersection_ with_ support_ map_ with_ params - Cast a ray on a shape using the GJK algorithm.
- ray_
intersection_ with_ triangle - Computes the intersection between a triangle and a ray.
- ray_
toi_ with_ ball - Computes the time of impact of a ray on a ball.
- ray_
toi_ with_ plane - Computes the toi of a ray with a plane described by its center and normal.
- time_
of_ impact - Computes the smallest time at with two shapes under translational movement are separated by a
distance smaller or equal to
distance
. - time_
of_ impact_ ball_ ball - Time Of Impact of two balls under translational movement.
- time_
of_ impact_ composite_ shape_ shape - Time Of Impact of a composite shape with any other shape, under translational movement.
- time_
of_ impact_ plane_ support_ map - Time Of Impact of a plane with a support-mapped shape under translational movement.
- time_
of_ impact_ shape_ composite_ shape - Time Of Impact of any shape with a composite shape, under translational movement.
- time_
of_ impact_ support_ map_ plane - Time Of Impact of a plane with a support-mapped shape under translational movement.
- time_
of_ impact_ support_ map_ support_ map - Time of impacts between two support-mapped shapes under translational movement.