Struct CollisionResult
Defined in File collision_data.h
Inheritance Relationships
Base Type
public coal::QueryResult
(Struct QueryResult)
Struct Documentation
-
struct CollisionResult : public coal::QueryResult
collision result
Public Functions
-
inline CollisionResult()
-
inline void updateDistanceLowerBound(const CoalScalar &distance_lower_bound_)
Update the lower bound only if the distance is inferior.
-
inline bool operator==(const CollisionResult &other) const
whether two CollisionResult are the same or not
-
inline bool isCollision() const
return binary collision result
-
inline size_t numContacts() const
number of contacts found
-
inline void clear()
clear the results obtained
Public Members
-
CoalScalar distance_lower_bound
Lower bound on distance between objects if they are disjoint. See Collision
Note
Always computed. If CollisionRequest::distance_upper_bound is set to infinity, distance_lower_bound is the actual distance between the shapes.
-
Vec3s normal
normal associated to nearest_points. Same as
CollisionResult::nearest_points
but for the normal.
-
std::array<Vec3s, 2> nearest_points
nearest points. A
CollisionResult
can have multiple contacts. The nearest points inCollisionResults
correspond to the witness points associated with the smallest distance i.e thedistance_lower_bound
. For bounding volumes and BVHs, these nearest points are available only when distance_lower_bound is inferior to CollisionRequest::break_distance.
-
inline CollisionResult()