collision and distance solver based on libccd library. More...
#include <hpp/fcl/narrowphase/narrowphase.h>
Public Member Functions | |
template<typename S1 , typename S2 > | |
bool | shapeIntersect (const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
intersection checking between two shapes More... | |
template<typename S > | |
bool | shapeTriangleIntersect (const S &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
intersection checking between one shape and a triangle More... | |
template<typename S > | |
bool | shapeTriangleIntersect (const S &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<typename S1 , typename S2 > | |
bool | shapeDistance (const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
distance computation between two shapes More... | |
template<typename S1 , typename S2 > | |
bool | shapeDistance (const S1 &s1, const Transform3f &tf1, const S2 &s2, const Transform3f &tf2, FCL_REAL *dist) const |
template<typename S > | |
bool | shapeTriangleDistance (const S &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
distance computation between one shape and a triangle More... | |
template<typename S > | |
bool | shapeTriangleDistance (const S &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, FCL_REAL *dist) |
template<typename S > | |
bool | shapeTriangleDistance (const S &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
distance computation between one shape and a triangle with transformation More... | |
template<typename S > | |
bool | shapeTriangleDistance (const S &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, FCL_REAL *dist) const |
GJKSolver_libccd () | |
default setting for GJK algorithm More... | |
void | enableCachedGuess (bool if_enable) const |
void | setCachedGuess (const Vec3f &guess) const |
Vec3f | getCachedGuess () const |
template<> | |
bool | shapeIntersect (const Sphere &s1, const Transform3f &tf1, const Capsule &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
Fast implementation for sphere-capsule collision. More... | |
template<> | |
bool | shapeIntersect (const Sphere &s1, const Transform3f &tf1, const Sphere &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
Fast implementation for sphere-sphere collision. More... | |
template<> | |
bool | shapeIntersect (const Box &s1, const Transform3f &tf1, const Box &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
Fast implementation for box-box collision. More... | |
template<> | |
bool | shapeIntersect (const Sphere &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Box &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Capsule &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Cylinder &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Cone &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Halfspace &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Plane &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Sphere &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Box &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Capsule &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Cylinder &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Cone &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Halfspace &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeIntersect (const Plane &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeTriangleIntersect (const Sphere &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
Fast implementation for sphere-triangle collision. More... | |
template<> | |
bool | shapeTriangleIntersect (const Sphere &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
Fast implementation for sphere-triangle collision. More... | |
template<> | |
bool | shapeTriangleIntersect (const Halfspace &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeTriangleIntersect (const Plane &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal) const |
template<> | |
bool | shapeDistance (const Sphere &s1, const Transform3f &tf1, const Capsule &s2, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
Fast implementation for sphere-capsule distance. More... | |
template<> | |
bool | shapeDistance (const Sphere &s1, const Transform3f &tf1, const Sphere &s2, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
Fast implementation for sphere-sphere distance. More... | |
template<> | |
bool | shapeTriangleDistance (const Sphere &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
Fast implementation for sphere-triangle distance. More... | |
template<> | |
bool | shapeTriangleDistance (const Sphere &s, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
Fast implementation for sphere-triangle distance. More... | |
template<> | |
bool | shapeDistance (const Capsule &s1, const Transform3f &tf1, const Capsule &s2, const Transform3f &tf2, FCL_REAL *dist, Vec3f *p1, Vec3f *p2) const |
Public Attributes | |
unsigned int | max_collision_iterations |
maximum number of iterations used in GJK algorithm for collision More... | |
unsigned int | max_distance_iterations |
maximum number of iterations used in GJK algorithm for distance More... | |
FCL_REAL | collision_tolerance |
the threshold used in GJK algorithm to stop collision iteration More... | |
FCL_REAL | distance_tolerance |
the threshold used in GJK algorithm to stop distance iteration More... | |
collision and distance solver based on libccd library.
|
inline |
default setting for GJK algorithm
References collision_tolerance, distance_tolerance, max_collision_iterations, and max_distance_iterations.
|
inline |
|
inline |
|
inline |
|
inline |
distance computation between two shapes
References fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), distance_tolerance, fcl::details::GJKDistance(), and max_distance_iterations.
Referenced by shapeDistance().
|
inline |
References shapeDistance().
bool fcl::GJKSolver_libccd::shapeDistance | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Capsule & | s2, | ||
const Transform3f & | tf2, | ||
FCL_REAL * | dist, | ||
Vec3f * | p1, | ||
Vec3f * | p2 | ||
) | const |
Fast implementation for sphere-capsule distance.
bool fcl::GJKSolver_libccd::shapeDistance | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Sphere & | s2, | ||
const Transform3f & | tf2, | ||
FCL_REAL * | dist, | ||
Vec3f * | p1, | ||
Vec3f * | p2 | ||
) | const |
Fast implementation for sphere-sphere distance.
bool fcl::GJKSolver_libccd::shapeDistance | ( | const Capsule & | s1, |
const Transform3f & | tf1, | ||
const Capsule & | s2, | ||
const Transform3f & | tf2, | ||
FCL_REAL * | dist, | ||
Vec3f * | p1, | ||
Vec3f * | p2 | ||
) | const |
|
inline |
intersection checking between two shapes
References collision_tolerance, fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), fcl::details::GJKCollide(), and max_collision_iterations.
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Capsule & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
Fast implementation for sphere-capsule collision.
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Sphere & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
Fast implementation for sphere-sphere collision.
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Box & | s1, |
const Transform3f & | tf1, | ||
const Box & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
Fast implementation for box-box collision.
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Box & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Capsule & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Cylinder & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Cone & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Halfspace & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Plane & | s1, |
const Transform3f & | tf1, | ||
const Halfspace & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Sphere & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Box & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Capsule & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Cylinder & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Cone & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Halfspace & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeIntersect | ( | const Plane & | s1, |
const Transform3f & | tf1, | ||
const Plane & | s2, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
|
inline |
distance computation between one shape and a triangle
References fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), distance_tolerance, fcl::details::GJKDistance(), fcl::inverse(), max_distance_iterations, fcl::details::triCreateGJKObject(), fcl::details::triDeleteGJKObject(), and fcl::details::triGetSupportFunction().
Referenced by shapeTriangleDistance().
|
inline |
References shapeTriangleDistance().
|
inline |
distance computation between one shape and a triangle with transformation
References fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), distance_tolerance, fcl::details::GJKDistance(), fcl::inverse(), max_distance_iterations, fcl::details::triCreateGJKObject(), fcl::details::triDeleteGJKObject(), and fcl::details::triGetSupportFunction().
|
inline |
References shapeTriangleDistance().
bool fcl::GJKSolver_libccd::shapeTriangleDistance | ( | const Sphere & | s, |
const Transform3f & | tf, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
FCL_REAL * | dist, | ||
Vec3f * | p1, | ||
Vec3f * | p2 | ||
) | const |
Fast implementation for sphere-triangle distance.
bool fcl::GJKSolver_libccd::shapeTriangleDistance | ( | const Sphere & | s, |
const Transform3f & | tf1, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
const Transform3f & | tf2, | ||
FCL_REAL * | dist, | ||
Vec3f * | p1, | ||
Vec3f * | p2 | ||
) | const |
Fast implementation for sphere-triangle distance.
|
inline |
intersection checking between one shape and a triangle
References collision_tolerance, fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), fcl::details::GJKCollide(), max_collision_iterations, fcl::details::triCreateGJKObject(), fcl::details::triDeleteGJKObject(), fcl::details::triGetCenterFunction(), and fcl::details::triGetSupportFunction().
|
inline |
References collision_tolerance, fcl::details::GJKInitializer< T >::createGJKObject(), fcl::details::GJKInitializer< T >::deleteGJKObject(), fcl::details::GJKCollide(), max_collision_iterations, fcl::details::triCreateGJKObject(), fcl::details::triDeleteGJKObject(), fcl::details::triGetCenterFunction(), and fcl::details::triGetSupportFunction().
bool fcl::GJKSolver_libccd::shapeTriangleIntersect | ( | const Sphere & | s, |
const Transform3f & | tf, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
Fast implementation for sphere-triangle collision.
bool fcl::GJKSolver_libccd::shapeTriangleIntersect | ( | const Sphere & | s, |
const Transform3f & | tf1, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
Fast implementation for sphere-triangle collision.
bool fcl::GJKSolver_libccd::shapeTriangleIntersect | ( | const Halfspace & | s, |
const Transform3f & | tf1, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
bool fcl::GJKSolver_libccd::shapeTriangleIntersect | ( | const Plane & | s, |
const Transform3f & | tf1, | ||
const Vec3f & | P1, | ||
const Vec3f & | P2, | ||
const Vec3f & | P3, | ||
const Transform3f & | tf2, | ||
Vec3f * | contact_points, | ||
FCL_REAL * | penetration_depth, | ||
Vec3f * | normal | ||
) | const |
FCL_REAL fcl::GJKSolver_libccd::collision_tolerance |
the threshold used in GJK algorithm to stop collision iteration
Referenced by GJKSolver_libccd(), shapeIntersect(), and shapeTriangleIntersect().
FCL_REAL fcl::GJKSolver_libccd::distance_tolerance |
the threshold used in GJK algorithm to stop distance iteration
Referenced by GJKSolver_libccd(), shapeDistance(), and shapeTriangleDistance().
unsigned int fcl::GJKSolver_libccd::max_collision_iterations |
maximum number of iterations used in GJK algorithm for collision
Referenced by GJKSolver_libccd(), shapeIntersect(), and shapeTriangleIntersect().
unsigned int fcl::GJKSolver_libccd::max_distance_iterations |
maximum number of iterations used in GJK algorithm for distance
Referenced by GJKSolver_libccd(), shapeDistance(), and shapeTriangleDistance().