hpp-fcl  3.0.0
HPP fork of FCL -- The Flexible Collision Library
hpp::fcl::details::EPA Struct Reference

class for EPA algorithm More...

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

Collaboration diagram for hpp::fcl::details::EPA:

Classes

struct  SimplexFace
 
struct  SimplexFaceList
 The simplex list of EPA is a linked list of faces. Note: EPA's linked list does not own any memory. The memory it refers to is contiguous and owned by a std::vector. More...
 
struct  SimplexHorizon
 

Public Types

enum  Status {
  DidNotRun = -1 , Failed = 0 , Valid = 1 , AccuracyReached = 1 << 1 | Valid ,
  Degenerated = 1 << 1 | Failed , NonConvex = 2 << 1 | Failed , InvalidHull = 3 << 1 | Failed , OutOfFaces = 4 << 1 | Failed ,
  OutOfVertices = 5 << 1 | Failed , FallBack = 6 << 1 | Failed
}
 
typedef GJK::SimplexV SimplexVertex
 

Public Member Functions

 EPA (size_t max_iterations_, FCL_REAL tolerance_)
 
 EPA (const EPA &other)
 Copy constructor of EPA. Mostly needed for the copy constructor of GJKSolver. More...
 
size_t getNumMaxIterations () const
 Get the max number of iterations of EPA. More...
 
size_t getNumMaxVertices () const
 Get the max number of vertices of EPA. More...
 
size_t getNumMaxFaces () const
 Get the max number of faces of EPA. More...
 
FCL_REAL getTolerance () const
 Get the tolerance of EPA. More...
 
size_t getNumIterations () const
 Get the number of iterations of the last run of EPA. More...
 
size_t getNumVertices () const
 Get the number of vertices in the polytope of the last run of EPA. More...
 
size_t getNumFaces () const
 Get the number of faces in the polytope of the last run of EPA. More...
 
void reset (size_t max_iterations, FCL_REAL tolerance)
 resets the EPA algorithm, preparing it for a new run. It potentially reallocates memory for the vertices and faces if the passed parameters are bigger than the previous ones. This function does not modify the parameters of the EPA algorithm, i.e. the maximum number of iterations and the tolerance. More...
 
Status evaluate (GJK &gjk, const Vec3f &guess)
 
void getWitnessPointsAndNormal (const MinkowskiDiff &shape, Vec3f &w0, Vec3f &w1, Vec3f &normal) const
 

Static Public Member Functions

static void bind (SimplexFace *fa, size_t ea, SimplexFace *fb, size_t eb)
 We bind the face fa along its edge ea to the face fb along its edge fb. More...
 

Public Attributes

Status status
 
GJK::Simplex result
 
Vec3f normal
 
support_func_guess_t support_hint
 
FCL_REAL depth
 
SimplexFaceclosest_face
 

Detailed Description

class for EPA algorithm

Member Typedef Documentation

◆ SimplexVertex

Member Enumeration Documentation

◆ Status

Enumerator
DidNotRun 
Failed 
Valid 
AccuracyReached 
Degenerated 
NonConvex 
InvalidHull 
OutOfFaces 
OutOfVertices 
FallBack 

Constructor & Destructor Documentation

◆ EPA() [1/2]

hpp::fcl::details::EPA::EPA ( size_t  max_iterations_,
FCL_REAL  tolerance_ 
)
inline

◆ EPA() [2/2]

hpp::fcl::details::EPA::EPA ( const EPA other)
inline

Copy constructor of EPA. Mostly needed for the copy constructor of GJKSolver.

Member Function Documentation

◆ bind()

static void hpp::fcl::details::EPA::bind ( SimplexFace fa,
size_t  ea,
SimplexFace fb,
size_t  eb 
)
inlinestatic

We bind the face fa along its edge ea to the face fb along its edge fb.

◆ evaluate()

Status hpp::fcl::details::EPA::evaluate ( GJK gjk,
const Vec3f guess 
)
Returns
a Status which can be demangled using (status & Valid) or (status & Failed). The other values provide a more detailled status

◆ getNumFaces()

size_t hpp::fcl::details::EPA::getNumFaces ( ) const
inline

Get the number of faces in the polytope of the last run of EPA.

◆ getNumIterations()

size_t hpp::fcl::details::EPA::getNumIterations ( ) const
inline

Get the number of iterations of the last run of EPA.

◆ getNumMaxFaces()

size_t hpp::fcl::details::EPA::getNumMaxFaces ( ) const
inline

Get the max number of faces of EPA.

◆ getNumMaxIterations()

size_t hpp::fcl::details::EPA::getNumMaxIterations ( ) const
inline

Get the max number of iterations of EPA.

◆ getNumMaxVertices()

size_t hpp::fcl::details::EPA::getNumMaxVertices ( ) const
inline

Get the max number of vertices of EPA.

◆ getNumVertices()

size_t hpp::fcl::details::EPA::getNumVertices ( ) const
inline

Get the number of vertices in the polytope of the last run of EPA.

◆ getTolerance()

FCL_REAL hpp::fcl::details::EPA::getTolerance ( ) const
inline

Get the tolerance of EPA.

◆ getWitnessPointsAndNormal()

void hpp::fcl::details::EPA::getWitnessPointsAndNormal ( const MinkowskiDiff shape,
Vec3f w0,
Vec3f w1,
Vec3f normal 
) const

Get the witness points on each object, and the corresponding normal.

Parameters
[in]shapeis the Minkowski difference of the two shapes.
[out]w0is the witness point on shape0.
[out]w1is the witness point on shape1.
[in]normalis the normal found by EPA. It points from shape0 to shape1. The normal is used to correct the witness points on the shapes if the shapes have a non-zero swept-sphere radius.

◆ reset()

void hpp::fcl::details::EPA::reset ( size_t  max_iterations,
FCL_REAL  tolerance 
)

resets the EPA algorithm, preparing it for a new run. It potentially reallocates memory for the vertices and faces if the passed parameters are bigger than the previous ones. This function does not modify the parameters of the EPA algorithm, i.e. the maximum number of iterations and the tolerance.

Note
calling this function destroys the previous state of EPA. In the future, we may want to copy it instead, i.e. when EPA will be (properly) warm-startable.

Member Data Documentation

◆ closest_face

SimplexFace* hpp::fcl::details::EPA::closest_face

◆ depth

FCL_REAL hpp::fcl::details::EPA::depth

◆ normal

Vec3f hpp::fcl::details::EPA::normal

◆ result

GJK::Simplex hpp::fcl::details::EPA::result

◆ status

Status hpp::fcl::details::EPA::status

◆ support_hint

support_func_guess_t hpp::fcl::details::EPA::support_hint

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