Classes | Public Types | Public Member Functions | Public Attributes | List of all members
hpp::fcl::details::GJK Struct Reference

class for GJK algorithm More...

#include <hpp/fcl/narrowphase/gjk.h>

Collaboration diagram for hpp::fcl::details::GJK:
[legend]

Classes

struct  Simplex
 
struct  SimplexV
 

Public Types

enum  Status {
  Valid,
  Inside,
  Failed
}
 

Public Member Functions

 GJK (unsigned int max_iterations_, FCL_REAL tolerance_)
 
void initialize ()
 
Status evaluate (const MinkowskiDiff &shape_, const Vec3f &guess)
 GJK algorithm, given the initial value guess. More...
 
void getSupport (const Vec3f &d, SimplexV &sv) const
 apply the support function along a direction, the result is return in sv More...
 
void removeVertex (Simplex &simplex)
 discard one vertex from the simplex More...
 
void appendVertex (Simplex &simplex, const Vec3f &v)
 append one vertex to the simplex More...
 
bool encloseOrigin ()
 whether the simplex enclose the origin More...
 
SimplexgetSimplex () const
 get the underlying simplex using in GJK, can be used for cache in next iteration More...
 
Vec3f getGuessFromSimplex () const
 get the guess from current simplex More...
 

Public Attributes

MinkowskiDiff shape
 
Vec3f ray
 
FCL_REAL distance
 
Simplex simplices [2]
 

Detailed Description

class for GJK algorithm

Note
The computations are performed in the frame of the first shape.

Member Enumeration Documentation

Enumerator
Valid 
Inside 
Failed 

Constructor & Destructor Documentation

hpp::fcl::details::GJK::GJK ( unsigned int  max_iterations_,
FCL_REAL  tolerance_ 
)
inline

Member Function Documentation

void hpp::fcl::details::GJK::appendVertex ( Simplex simplex,
const Vec3f v 
)

append one vertex to the simplex

bool hpp::fcl::details::GJK::encloseOrigin ( )

whether the simplex enclose the origin

Status hpp::fcl::details::GJK::evaluate ( const MinkowskiDiff shape_,
const Vec3f guess 
)
Vec3f hpp::fcl::details::GJK::getGuessFromSimplex ( ) const
Simplex* hpp::fcl::details::GJK::getSimplex ( ) const
inline

get the underlying simplex using in GJK, can be used for cache in next iteration

Referenced by hpp::fcl::GJKSolver_indep::shapeDistance(), and hpp::fcl::GJKSolver_indep::shapeTriangleInteraction().

void hpp::fcl::details::GJK::getSupport ( const Vec3f d,
SimplexV sv 
) const

apply the support function along a direction, the result is return in sv

void hpp::fcl::details::GJK::initialize ( )
void hpp::fcl::details::GJK::removeVertex ( Simplex simplex)

discard one vertex from the simplex

Member Data Documentation

FCL_REAL hpp::fcl::details::GJK::distance
Vec3f hpp::fcl::details::GJK::ray
MinkowskiDiff hpp::fcl::details::GJK::shape
Simplex hpp::fcl::details::GJK::simplices[2]