class for GJK algorithm More...
#include <hpp/fcl/narrowphase/gjk.h>
Classes | |
| struct | Simplex |
| struct | SimplexV |
Public Types | |
| enum | Status { Valid, Inside, Failed } |
| typedef unsigned char | vertex_id_t |
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, bool dIsNormalized, SimplexV &sv) const |
| apply the support function along a direction, the result is return in sv More... | |
| bool | encloseOrigin () |
| whether the simplex enclose the origin More... | |
| Simplex * | getSimplex () const |
| get the underlying simplex using in GJK, can be used for cache in next iteration More... | |
| bool | hasClosestPoints () |
| Tells whether the closest points are available. More... | |
| bool | hasPenetrationInformation (const MinkowskiDiff &shape) |
| Tells whether the penetration information. More... | |
| bool | getClosestPoints (const MinkowskiDiff &shape, Vec3f &w0, Vec3f &w1) |
| Get the closest points on each object. More... | |
| Vec3f | getGuessFromSimplex () const |
| get the guess from current simplex More... | |
| void | setDistanceEarlyBreak (const FCL_REAL &dup) |
| Distance threshold for early break. More... | |
Public Attributes | |
| MinkowskiDiff const * | shape |
| Vec3f | ray |
| FCL_REAL | distance |
| The distance computed by GJK. More... | |
| Simplex | simplices [2] |
class for GJK algorithm
| typedef unsigned char hpp::fcl::details::GJK::vertex_id_t |
|
inline |
References initialize().
| bool hpp::fcl::details::GJK::encloseOrigin | ( | ) |
whether the simplex enclose the origin
| Status hpp::fcl::details::GJK::evaluate | ( | const MinkowskiDiff & | shape, |
| const Vec3f & | guess | ||
| ) |
GJK algorithm, given the initial value guess.
Referenced by hpp::fcl::GJKSolver::shapeDistance(), hpp::fcl::GJKSolver::shapeIntersect(), and hpp::fcl::GJKSolver::shapeTriangleInteraction().
| bool hpp::fcl::details::GJK::getClosestPoints | ( | const MinkowskiDiff & | shape, |
| Vec3f & | w0, | ||
| Vec3f & | w1 | ||
| ) |
Get the closest points on each object.
Referenced by hpp::fcl::GJKSolver::shapeDistance(), hpp::fcl::GJKSolver::shapeIntersect(), and hpp::fcl::GJKSolver::shapeTriangleInteraction().
| Vec3f hpp::fcl::details::GJK::getGuessFromSimplex | ( | ) | const |
get the guess from current simplex
Referenced by hpp::fcl::GJKSolver::shapeDistance(), hpp::fcl::GJKSolver::shapeIntersect(), and hpp::fcl::GJKSolver::shapeTriangleInteraction().
|
inline |
get the underlying simplex using in GJK, can be used for cache in next iteration
|
inline |
apply the support function along a direction, the result is return in sv
References hpp::fcl::details::MinkowskiDiff::support(), hpp::fcl::details::GJK::SimplexV::w, hpp::fcl::details::GJK::SimplexV::w0, and hpp::fcl::details::GJK::SimplexV::w1.
|
inline |
Tells whether the closest points are available.
|
inline |
Tells whether the penetration information.
In such case, most indepth points and penetration depth can be retrieved from GJK. Calling EPA has an undefined behaviour.
References hpp::fcl::details::MinkowskiDiff::inflation.
Referenced by hpp::fcl::GJKSolver::shapeDistance(), hpp::fcl::GJKSolver::shapeIntersect(), and hpp::fcl::GJKSolver::shapeTriangleInteraction().
| void hpp::fcl::details::GJK::initialize | ( | ) |
|
inline |
Distance threshold for early break.
GJK stops when it proved the distance is more than this threshold.
| FCL_REAL hpp::fcl::details::GJK::distance |
The distance computed by GJK.
The possible values are
where \( d \) is the GJK::distance, \( R \) is the sum of the shape MinkowskiDiff::inflation and \( d_{ub} \) is the GJK::distance_upper_bound.
Referenced by hpp::fcl::GJKSolver::shapeDistance(), hpp::fcl::GJKSolver::shapeIntersect(), and hpp::fcl::GJKSolver::shapeTriangleInteraction().
| Vec3f hpp::fcl::details::GJK::ray |
| MinkowskiDiff const* hpp::fcl::details::GJK::shape |
| Simplex hpp::fcl::details::GJK::simplices[2] |