Go to the documentation of this file.
52 for (std::vector<Contact>::iterator it =
contacts.begin();
54 std::swap(it->o1, it->o2);
55 std::swap(it->b1, it->b2);
56 it->nearest_points[0].swap(it->nearest_points[1]);
72 if (request.
security_margin == -std::numeric_limits<CoalScalar>::infinity()) {
83 std::invalid_argument);
98 <<
" is not yet supported.",
99 std::invalid_argument);
103 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<CoalScalar>::infinity()) {
const CollisionGeometry * o1
support_func_guess_t cached_support_func_guess
stores the last support function vertex index, when relevant.
collision matrix stores the functions for collision between different types of objects and provides a...
virtual NODE_TYPE getNodeType() const
get the node type
virtual std::size_t run(const Transform3s &tf1, const Transform3s &tf2, const CollisionRequest &request, CollisionResult &result) const
void swapObjects()
reposition Contact objects when fcl inverts them during their construction.
COAL_COMPILER_DIAGNOSTIC_POP void updateGuess(const QueryResult &result) const
Updates the guess for the internal GJK algorithm in order to warm-start it when reusing this collisio...
This class mimics the way "boost/timer/timer.hpp" operates while using the modern std::chrono library...
CollisionFunctionMatrix & getCollisionFunctionLookTable()
const CollisionGeometry * collisionGeometryPtr() const
get raw pointer to collision geometry of the object instance
std::vector< Contact > contacts
contact information
const Transform3s & getTransform() const
get object's transform
CoalScalar security_margin
Distance below which objects are considered in collision. See Collision.
Vec3s cached_gjk_guess
stores the last GJK ray when relevant.
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
bool enable_timings
enable timings when performing collision/distance request
std::array< Vec3s, 2 > nearest_points
nearest points. A CollisionResult can have multiple contacts. The nearest points in CollisionResults ...
collision and distance solver based on the GJK and EPA algorithms. Originally, GJK and EPA were imple...
The geometry for the object for collision or distance computation.
virtual OBJECT_TYPE getObjectType() const
get the type of the object
CPUTimes timings
timings for the given request
void clear()
clear the results obtained
support_func_guess_t support_func_cached_guess
smart guess for the support function
void set(const DistanceRequest &request)
setter from a DistanceRequest
#define COAL_THROW_PRETTY(message, exception)
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...
const CollisionGeometry * o2
request to the collision algorithm
the object for collision or distance computation, contains the geometry and the transform information
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
ComputeCollision(const CollisionGeometry *o1, const CollisionGeometry *o2)
Default constructor from two Collision Geometries.
Vec3s cached_guess
smart guess
const char * get_node_type_name(NODE_TYPE node_type)
Returns the name associated to a NODE_TYPE.
size_t num_max_contacts
The maximum number of contacts that can be returned.
std::size_t operator()(const Transform3s &tf1, const Transform3s &tf2, const CollisionRequest &request, CollisionResult &result) const
Vec3s normal
normal associated to nearest_points. Same as CollisionResult::nearest_points but for the normal.
COAL_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,...
CollisionFunctionMatrix::CollisionFunc func
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57