Struct DistanceRequest

Inheritance Relationships

Base Type

Struct Documentation

struct DistanceRequest : public coal::QueryRequest

request to the distance computation

Public Functions

COAL_DEPRECATED_MESSAGE (Nearest points are always computed :they are the points of the shapes that achieve a distance of `DistanceResult::min_distance` .\n Use `enable_signed_distance` if you want to compute a signed minimum distance(and thus its corresponding nearest points) .) bool enable_nearest_points

whether to return the nearest points. Nearest points are always computed and are the points of the shapes that achieve a distance of DistanceResult::min_distance.

inline COAL_COMPILER_DIAGNOSTIC_PUSH COAL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS DistanceRequest (bool enable_nearest_points_=true, bool enable_signed_distance_=true, CoalScalar rel_err_=0.0, CoalScalar abs_err_=0.0)
Parameters:
  • enable_nearest_points_ – enables the nearest points computation.

  • enable_signed_distance_ – allows to compute the penetration depth

  • rel_err_

  • abs_err_

COAL_COMPILER_DIAGNOSTIC_POP bool isSatisfied (const DistanceResult &result) const
COAL_COMPILER_DIAGNOSTIC_PUSH COAL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS DistanceRequest & operator= (const DistanceRequest &other)=default
inline COAL_COMPILER_DIAGNOSTIC_POP bool operator== (const DistanceRequest &other) const

whether two DistanceRequest are the same or not

Public Members

bool enable_signed_distance

whether to compute the penetration depth when objects are in collision. Turning this off can save computation time if only the distance when objects are disjoint is needed.

Note

The minimum distance between the shapes is stored in DistanceResult::min_distance. If enable_signed_distance is off, DistanceResult::min_distance is always positive. If enable_signed_distance is on, DistanceResult::min_distance can be positive or negative. The nearest points are the points of the shapes that achieve a distance of DistanceResult::min_distance.

CoalScalar rel_err

error threshold for approximate distance

CoalScalar abs_err