Public Member Functions | Public Attributes | Static Public Attributes
fcl::DistanceResult Struct Reference

distance result More...

#include <hpp/fcl/collision_data.h>

Collaboration diagram for fcl::DistanceResult:
[legend]

List of all members.

Public Member Functions

 DistanceResult (FCL_REAL min_distance_=std::numeric_limits< FCL_REAL >::max())
void update (FCL_REAL distance, const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_)
 add distance information into the result
void update (FCL_REAL distance, const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_, const Vec3f &p1, const Vec3f &p2)
 add distance information into the result
void update (const DistanceResult &other_result)
 add distance information into the result
void clear ()
 clear the result

Public Attributes

FCL_REAL min_distance
 minimum distance between two objects. if two objects are in collision, min_distance <= 0.
Vec3f nearest_points [2]
 nearest points
const CollisionGeometryo1
 collision object 1
const CollisionGeometryo2
 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

Static Public Attributes

static const int NONE = -1
 invalid contact primitive information

Detailed Description

distance result


Constructor & Destructor Documentation

fcl::DistanceResult::DistanceResult ( FCL_REAL  min_distance_ = std::numeric_limits<FCL_REAL>::max()) [inline]

Member Function Documentation

void fcl::DistanceResult::clear ( ) [inline]

clear the result

References b1, b2, fcl::max(), min_distance, NONE, o1, and o2.

void fcl::DistanceResult::update ( FCL_REAL  distance,
const CollisionGeometry o1_,
const CollisionGeometry o2_,
int  b1_,
int  b2_ 
) [inline]
void fcl::DistanceResult::update ( FCL_REAL  distance,
const CollisionGeometry o1_,
const CollisionGeometry o2_,
int  b1_,
int  b2_,
const Vec3f p1,
const Vec3f p2 
) [inline]

add distance information into the result

References b1, b2, fcl::distance(), min_distance, nearest_points, o1, and o2.

void fcl::DistanceResult::update ( const DistanceResult other_result) [inline]

add distance information into the result

References b1, b2, min_distance, nearest_points, o1, and o2.


Member Data Documentation

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

Referenced by clear(), and update().

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

Referenced by clear(), and update().

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

Referenced by fcl::MeshDistanceTraversalNode< OBBRSS >::canStop(), fcl::MeshShapeDistanceTraversalNode< OBBRSS, S, NarrowPhaseSolver >::canStop(), clear(), and update().

nearest points

Referenced by update().

const int fcl::DistanceResult::NONE = -1 [static]

collision object 1

Referenced by clear(), and update().

collision object 2

Referenced by clear(), and update().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines