38 #ifndef FCL_NARROWPHASE_DETAIL_GJKLIBCCD_H 39 #define FCL_NARROWPHASE_DETAIL_GJKLIBCCD_H 44 #include "fcl/geometry/shape/box.h" 45 #include "fcl/geometry/shape/capsule.h" 46 #include "fcl/geometry/shape/cone.h" 47 #include "fcl/geometry/shape/convex.h" 48 #include "fcl/geometry/shape/cylinder.h" 49 #include "fcl/geometry/shape/ellipsoid.h" 50 #include "fcl/geometry/shape/halfspace.h" 51 #include "fcl/geometry/shape/plane.h" 52 #include "fcl/geometry/shape/sphere.h" 53 #include "fcl/geometry/shape/triangle_p.h" 54 #include "fcl/narrowphase/detail/convexity_based_algorithm/simplex.h" 55 #include "fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd.h" 65 using GJKSupportFunction = void (*)(
const void* obj,
const ccd_vec3_t* dir_, ccd_vec3_t* v);
66 using GJKCenterFunction = void (*)(
const void* obj, ccd_vec3_t* c);
69 template <
typename S,
typename T>
82 static void*
createGJKObject(
const T& ,
const Transform3<S>& ) {
return nullptr; }
100 template <
typename S>
111 template <
typename S>
122 template <
typename S>
133 template <
typename S>
144 template <
typename S>
155 template <
typename S>
166 GJKSupportFunction triGetSupportFunction();
168 GJKCenterFunction triGetCenterFunction();
170 template <
typename S>
171 void* triCreateGJKObject(
const Vector3<S>& P1,
const Vector3<S>& P2,
const Vector3<S>& P3);
173 template <
typename S>
174 void* triCreateGJKObject(
const Vector3<S>& P1,
const Vector3<S>& P2,
const Vector3<S>& P3,
const Transform3<S>& tf);
176 void triDeleteGJKObject(
void* o);
179 template <
typename S>
182 ccd_support_fn supp1,
185 ccd_support_fn supp2,
187 unsigned int max_iterations,
189 Vector3<S>* contact_points,
190 S* penetration_depth,
193 template <
typename S>
194 bool GJKDistance(
void* obj1, ccd_support_fn supp1,
195 void* obj2, ccd_support_fn supp2,
196 unsigned int max_iterations, S tolerance,
197 S* dist, Vector3<S>* p1, Vector3<S>* p2);
202 #include "fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd-inl.h" Main namespace.
Definition: broadphase_bruteforce-inl.h:45
Center at zero point ellipsoid.
Definition: ellipsoid.h:48
static void * createGJKObject(const T &, const Transform3< S > &)
Get GJK object from a shape Notice that only local transformation is applied. Gloal transformation ar...
Definition: gjk_libccd.h:82
initialize GJK stuffs
Definition: gjk_libccd.h:70
static GJKCenterFunction getCenterFunction()
Get GJK center function.
Definition: gjk_libccd.h:77
Center at zero point capsule.
Definition: capsule.h:48
Center at zero point, axis aligned box.
Definition: box.h:48
static void deleteGJKObject(void *o)
Delete GJK object.
Definition: gjk_libccd.h:85
Convex polytope.
Definition: convex.h:48
Center at zero cylinder.
Definition: cylinder.h:48
Center at zero cone.
Definition: cone.h:48
Center at zero point sphere.
Definition: sphere.h:48
static GJKSupportFunction getSupportFunction()
Get GJK support function.
Definition: gjk_libccd.h:74