55 for (std::vector<Contact>::iterator it =
contacts.begin();
57 std::swap(it->o1, it->o2);
58 std::swap(it->b1, it->b2);
74 if (request.
security_margin == -std::numeric_limits<FCL_REAL>::infinity()) {
85 std::invalid_argument);
100 <<
" is not yet supported.",
101 std::invalid_argument);
105 o2,
tf2, o1,
tf1, &solver, request, result);
114 <<
" is not yet supported.",
115 std::invalid_argument);
119 o1,
tf1, o2,
tf2, &solver, request, result);
150 <<
" is not yet supported.",
151 std::invalid_argument);
164 if (request.
security_margin == -std::numeric_limits<FCL_REAL>::infinity()) {
189 res =
run(tf1, tf2, request, result);
192 res =
run(tf1, tf2, request, result);
size_t num_max_contacts
The maximum number of contacts will return.
support_func_guess_t cached_support_func_guess
stores the last support function vertex index, when relevant.
const char * get_node_type_name(NODE_TYPE node_type)
Returns the name associated to a NODE_TYPE.
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
std::vector< Contact > contacts
contact information
CollisionFunc collision_matrix[NODE_COUNT][NODE_COUNT]
each item in the collision matrix is a function to handle collision between objects of type1 and type...
bool enable_cached_guess
Whether smart guess can be provided Use gjk_initial_guess instead.
const CollisionGeometry * o1
const Transform3f & getTransform() const
get object's transform
CollisionFunctionMatrix & getCollisionFunctionLookTable()
virtual NODE_TYPE getNodeType() const
get the node type
request to the collision algorithm
void clear()
clear the results obtained
void set(const DistanceRequest &request)
setter from a DistanceRequest
virtual OBJECT_TYPE getObjectType() const
get the type of the object
This class mimics the way "boost/timer/timer.hpp" operates while using the modern std::chrono library...
CPUTimes timings
timings for the given request
bool enable_timings
enable timings when performing collision/distance request
const shared_ptr< const CollisionGeometry > collisionGeometry() const
get geometry from the object instance
Vec3f cached_guess
smart guess
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18, kDOP24), basic shape (box, sphere, ellipsoid, capsule, cone, cylinder, convex, plane, triangle), and octree
HPP_FCL_DLLAPI std::size_t collide(const CollisionObject *o1, const CollisionObject *o2, const CollisionRequest &request, CollisionResult &result)
Main collision interface: given two collision objects, and the requirements for contacts, including num of max contacts, whether perform exhaustive collision (i.e., returning returning all the contact points), whether return detailed contact information (i.e., normal, contact point, depth; otherwise only contact primitive id is returned), this function performs the collision between them. Return value is the number of contacts generated between the two objects.
std::size_t operator()(const Transform3f &tf1, const Transform3f &tf2, const CollisionRequest &request, CollisionResult &result) const
CollisionFunctionMatrix::CollisionFunc func
ComputeCollision(const CollisionGeometry *o1, const CollisionGeometry *o2)
Default constructor from two Collision Geometries.
Vec3f cached_gjk_guess
stores the last GJK ray when relevant.
const CollisionGeometry * o2
collision and distance solver based on GJK algorithm implemented in fcl (rewritten the code from the ...
the object for collision or distance computation, contains the geometry and the transform information...
The geometry for the object for collision or distance computation.
support_func_guess_t support_func_cached_guess
smart guess for the support function
virtual std::size_t run(const Transform3f &tf1, const Transform3f &tf2, const CollisionRequest &request, CollisionResult &result) const
void swapObjects()
reposition Contact objects when fcl inverts them during their construction.
GJKInitialGuess gjk_initial_guess
which warm start to use for GJK
collision matrix stores the functions for collision between different types of objects and provides a...
#define HPP_FCL_THROW_PRETTY(message, exception)
FCL_REAL security_margin
Distance below which objects are considered in collision. See Collision.