Struct DistanceResult

Inheritance Relationships

Base Type

Struct Documentation

struct DistanceResult : public hpp::fcl::QueryResult

distance result

Public Functions

inline DistanceResult(FCL_REAL min_distance_ = (std::numeric_limits<FCL_REAL>::max)())
inline void update(FCL_REAL distance, const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_)

add distance information into the result

inline void update(FCL_REAL distance, const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_, const Vec3f &p1, const Vec3f &p2, const Vec3f &normal_)

add distance information into the result

inline void update(const DistanceResult &other_result)

add distance information into the result

inline void clear()

clear the result

inline bool operator==(const DistanceResult &other) const

whether two DistanceResult are the same or not

Public Members

FCL_REAL min_distance

minimum distance between two objects. if two objects are in collision, min_distance <= 0.

Vec3f nearest_points[2]

nearest points

Vec3f normal

In case both objects are in collision, store the normal.

const CollisionGeometry *o1

collision object 1

const CollisionGeometry *o2

collision object 2

int b1

information about the nearest point in object 1 if object 1 is mesh or point cloud, it is the triangle or point id if object 1 is geometry shape, it is NONE (-1), if object 1 is octree, it is the id of the cell

int b2

information about the nearest point in object 2 if object 2 is mesh or point cloud, it is the triangle or point id if object 2 is geometry shape, it is NONE (-1), if object 2 is octree, it is the id of the cell

Public Static Attributes

static const int NONE = -1

invalid contact primitive information