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 be closest_points, distance, contact, proximity or time_of_impact.
  • [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.
  • [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.

Modules

  • Algorithms needed for distance and penetration depth computation.
  • Visitors for performing geometric queries exploiting spatial partitioning data structures.

Structs

  • The composition of two dispatchers
  • Geometric description of a contact.
  • A contact identifier which is unique within a contact manifold.
  • Local contact kinematic of a pair of solids around two given points.
  • A contact manifold.
  • The prediction parameters for contact determination.
  • A dispatcher that exposes built-in queries
  • The approximation of a shape on the neighborhood of a point.
  • Description of the projection of a point on a shape.
  • A Ray.
  • Structure containing the result of a successful ray cast.
  • The result of a time-of-impact (TOI) computation.
  • A contact combined with contact kinematic information as well as a persistent identifier.
  • Error indicating that a query is not supported between certain shapes

Enums

Traits

  • Pre-process a contact before it is added to a contact manifold.
  • Trait of objects that can be tested for point inclusion and projection.
  • Returns shape-specific info in addition to generic projection information
  • Traits of objects which can be transformed and tested for intersection with a ray.
  • Dispatcher for time-of-impact queries

Functions