Struct ContactPatchFunctionMatrix
Defined in File contact_patch_func_matrix.h
Struct Documentation
-
struct ContactPatchFunctionMatrix
The contact patch matrix stores the functions for contact patches computation between different types of objects and provides a uniform call interface.
Public Types
-
typedef void (*ContactPatchFunc)(const CollisionGeometry *o1, const Transform3s &tf1, const CollisionGeometry *o2, const Transform3s &tf2, const CollisionResult &collision_result, const ContactPatchSolver *csolver, const ContactPatchRequest &request, ContactPatchResult &result)
the uniform call interface for computing contact patches: we need know
two objects o1 and o2 and their configuration in world coordinate tf1 and tf2;
the collision result that generated contact patches candidates (
coal::Contact
), from which contact patches will be expanded;the solver for computation of contact patches;
the request setting for contact patches (e.g. maximum amount of patches, patch tolerance etc.)
the structure to return contact patches (
coal::ContactPatchResult
).
Note: we pass a GJKSolver, because it allows to reuse internal computation that was made during the narrow phase. It also allows to experiment with different ways to compute contact patches. We could, for example, perturb tf1 and tf2 and make multiple calls to the GJKSolver (although this is not the approach done by default).
Public Functions
-
ContactPatchFunctionMatrix()
Public Members
-
ContactPatchFunc contact_patch_matrix[NODE_COUNT][NODE_COUNT]
Each item in the contact patch matrix is a function to handle contact patch computation between objects of type1 and type2.
-
typedef void (*ContactPatchFunc)(const CollisionGeometry *o1, const Transform3s &tf1, const CollisionGeometry *o2, const Transform3s &tf2, const CollisionResult &collision_result, const ContactPatchSolver *csolver, const ContactPatchRequest &request, ContactPatchResult &result)