Public Member Functions | Public Attributes | Static Public Attributes | List of all members
fcl::DistanceResult< S > Struct Template Reference

distance result More...

#include <distance_request.h>

Public Member Functions

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

Public Attributes

intptr_t 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 query cell id (see OcTree::getNodeByQueryCellId) More...
 
intptr_t 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 query cell id (see OcTree::getNodeByQueryCellId) More...
 
min_distance
 Minimum distance between two objects. More...
 
Vector3< S > nearest_points [2]
 Nearest points in the world coordinates. More...
 
const CollisionGeometry< S > * o1
 collision object 1 More...
 
const CollisionGeometry< S > * o2
 collision object 2 More...
 

Static Public Attributes

static const int NONE = -1
 invalid contact primitive information More...
 

Detailed Description

template<typename S>
struct fcl::DistanceResult< S >

distance result

Definition at line 48 of file distance_request.h.

Constructor & Destructor Documentation

◆ DistanceResult()

template<typename S >
FCL_EXPORT fcl::DistanceResult< S >::DistanceResult ( min_distance_ = std::numeric_limits<S>::max())

Definition at line 53 of file distance_result-inl.h.

Member Function Documentation

◆ clear()

template<typename S >
FCL_EXPORT void fcl::DistanceResult< S >::clear

clear the result

Definition at line 127 of file distance_result-inl.h.

◆ update() [1/3]

template<typename S >
FCL_EXPORT void fcl::DistanceResult< S >::update ( const DistanceResult< S > &  other_result)

add distance information into the result

Definition at line 110 of file distance_result-inl.h.

◆ update() [2/3]

template<typename S >
FCL_EXPORT void fcl::DistanceResult< S >::update ( distance,
const CollisionGeometry< S > *  o1_,
const CollisionGeometry< S > *  o2_,
int  b1_,
int  b2_ 
)

add distance information into the result

Definition at line 66 of file distance_result-inl.h.

◆ update() [3/3]

template<typename S >
FCL_EXPORT void fcl::DistanceResult< S >::update ( distance,
const CollisionGeometry< S > *  o1_,
const CollisionGeometry< S > *  o2_,
int  b1_,
int  b2_,
const Vector3< S > &  p1,
const Vector3< S > &  p2 
)

add distance information into the result

Definition at line 86 of file distance_result-inl.h.

Member Data Documentation

◆ b1

template<typename S >
intptr_t fcl::DistanceResult< S >::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 query cell id (see OcTree::getNodeByQueryCellId)

Definition at line 82 of file distance_result.h.

◆ b2

template<typename S >
intptr_t fcl::DistanceResult< S >::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 query cell id (see OcTree::getNodeByQueryCellId)

Definition at line 89 of file distance_result.h.

◆ min_distance

template<typename S >
S fcl::DistanceResult< S >::min_distance

Minimum distance between two objects.

The distance is correct as a positive value when the two objects are not in collision. If they are in collision, min_distance would be a implementation defined negative value, which might not the correct negative distance. In order to get correct negative distance set DistanceRequest::enable_signed_distance to true.

See also
DistanceRequest::enable_signed_distance

Definition at line 64 of file distance_result.h.

◆ nearest_points

template<typename S >
Vector3<S> fcl::DistanceResult< S >::nearest_points[2]

Nearest points in the world coordinates.

See also
DistanceRequest::enable_nearest_points

Definition at line 69 of file distance_result.h.

◆ NONE

template<typename S >
const int fcl::DistanceResult< S >::NONE = -1
static

invalid contact primitive information

Definition at line 92 of file distance_result.h.

◆ o1

template<typename S >
const CollisionGeometry<S>* fcl::DistanceResult< S >::o1

collision object 1

Definition at line 72 of file distance_result.h.

◆ o2

template<typename S >
const CollisionGeometry<S>* fcl::DistanceResult< S >::o2

collision object 2

Definition at line 75 of file distance_result.h.


The documentation for this struct was generated from the following files:


fcl
Author(s):
autogenerated on Fri Apr 2 2021 02:38:02