38 #ifndef FCL_NARROWPHASE_DETAIL_GJK_H 39 #define FCL_NARROWPHASE_DETAIL_GJK_H 41 #include "fcl/common/types.h" 42 #include "fcl/narrowphase/detail/convexity_based_algorithm/minkowski_diff.h" 74 enum Status {Valid, Inside, Failed};
81 GJK(
unsigned int max_iterations_, S tolerance_);
117 unsigned int max_iterations;
128 #include "fcl/narrowphase/detail/convexity_based_algorithm/gjk-inl.h" Main namespace.
Definition: broadphase_bruteforce-inl.h:45
Minkowski difference class of two shapes.
Definition: minkowski_diff.h:58
bool encloseOrigin()
whether the simplex enclose the origin
Definition: gjk-inl.h:236
void getSupport(const Vector3< S > &d, SimplexV &sv) const
apply the support function along a direction, the result is return in sv
Definition: gjk-inl.h:204
Vector3< S > getGuessFromSimplex() const
get the guess from current simplex
Definition: gjk-inl.h:75
size_t rank
size of simplex (number of vertices)
Definition: gjk.h:69
void appendVertex(Simplex &simplex, const Vector3< S > &v)
append one vertex to the simplex
Definition: gjk-inl.h:227
Vector3< S > d
support direction
Definition: gjk.h:57
Status evaluate(const MinkowskiDiff< S > &shape_, const Vector3< S > &guess)
GJK algorithm, given the initial value guess.
Definition: gjk-inl.h:82
S distance(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2, Vector3< S > *P, Vector3< S > *Q)
Approximate distance between two kIOS bounding volumes.
Definition: kIOS-inl.h:266
Simplex * getSimplex() const
get the underlying simplex using in GJK, can be used for cache in next iteration
Definition: gjk-inl.h:302
class for GJK algorithm
Definition: gjk.h:52
Vector3< S > w
support vector (i.e., the furthest point on the shape along the support direction) ...
Definition: gjk.h:59
void removeVertex(Simplex &simplex)
discard one vertex from the simplex
Definition: gjk-inl.h:220