38 #ifndef FCL_NARROWPHASE_GJKSOLVERLIBCCD_H 39 #define FCL_NARROWPHASE_GJKSOLVERLIBCCD_H 41 #include "fcl/common/deprecated.h" 42 #include "fcl/common/types.h" 43 #include "fcl/narrowphase/contact_point.h" 52 template <
typename S_>
59 template<
typename Shape1,
typename Shape2>
63 const Transform3<S>& tf1,
65 const Transform3<S>& tf2,
66 Vector3<S>* contact_points,
68 Vector3<S>* normal)
const;
71 template<
typename Shape1,
typename Shape2>
74 const Transform3<S>& tf1,
76 const Transform3<S>& tf2,
80 template<
typename Shape>
83 const Transform3<S>& tf,
87 Vector3<S>* contact_points =
nullptr,
88 S* penetration_depth =
nullptr,
89 Vector3<S>* normal =
nullptr)
const;
92 template<
typename Shape>
95 const Transform3<S>& tf1,
99 const Transform3<S>& tf2,
100 Vector3<S>* contact_points =
nullptr,
101 S* penetration_depth =
nullptr,
102 Vector3<S>* normal =
nullptr)
const;
105 template<
typename Shape1,
typename Shape2>
108 const Transform3<S>& tf1,
110 const Transform3<S>& tf2,
112 Vector3<S>* p1 =
nullptr,
113 Vector3<S>* p2 =
nullptr)
const;
116 template<
typename Shape>
119 const Transform3<S>& tf,
120 const Vector3<S>& P1,
121 const Vector3<S>& P2,
122 const Vector3<S>& P3,
124 Vector3<S>* p1 =
nullptr,
125 Vector3<S>* p2 =
nullptr)
const;
128 template<
typename Shape>
131 const Transform3<S>& tf1,
132 const Vector3<S>& P1,
133 const Vector3<S>& P2,
134 const Vector3<S>& P3,
135 const Transform3<S>& tf2,
137 Vector3<S>* p1 =
nullptr,
138 Vector3<S>* p2 =
nullptr)
const;
143 void enableCachedGuess(
bool if_enable)
const;
145 void setCachedGuess(
const Vector3<S>& guess)
const;
147 Vector3<S> getCachedGuess()
const;
169 #include "fcl/narrowphase/detail/gjk_solver_libccd-inl.h" bool shapeTriangleDistance(const Shape &s, const Transform3< S > &tf, const Vector3< S > &P1, const Vector3< S > &P2, const Vector3< S > &P3, S *dist=nullptr, Vector3< S > *p1=nullptr, Vector3< S > *p2=nullptr) const
distance computation between one shape and a triangle
Definition: gjk_solver_libccd-inl.h:719
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
unsigned int max_collision_iterations
maximum number of iterations used in GJK algorithm for collision
Definition: gjk_solver_libccd.h:150
FCL_DEPRECATED bool shapeIntersect(const Shape1 &s1, const Transform3< S > &tf1, const Shape2 &s2, const Transform3< S > &tf2, Vector3< S > *contact_points, S *penetration_depth, Vector3< S > *normal) const
intersection checking between two shapes
S collision_tolerance
the threshold used in GJK algorithm to stop collision iteration
Definition: gjk_solver_libccd.h:156
bool shapeTriangleIntersect(const Shape &s, const Transform3< S > &tf, const Vector3< S > &P1, const Vector3< S > &P2, const Vector3< S > &P3, Vector3< S > *contact_points=nullptr, S *penetration_depth=nullptr, Vector3< S > *normal=nullptr) const
intersection checking between one shape and a triangle
Definition: gjk_solver_libccd-inl.h:369
collision and distance solver based on libccd library.
Definition: gjk_solver_libccd.h:53
S distance_tolerance
the threshold used in GJK algorithm to stop distance iteration
Definition: gjk_solver_libccd.h:159
bool shapeDistance(const Shape1 &s1, const Transform3< S > &tf1, const Shape2 &s2, const Transform3< S > &tf2, S *dist=nullptr, Vector3< S > *p1=nullptr, Vector3< S > *p2=nullptr) const
distance computation between two shapes
Definition: gjk_solver_libccd-inl.h:569
GJKSolver_libccd()
default setting for GJK algorithm
Definition: gjk_solver_libccd-inl.h:834
unsigned int max_distance_iterations
maximum number of iterations used in GJK algorithm for distance
Definition: gjk_solver_libccd.h:153