Result for a contact patch computation. More...
#include <collision_data.h>
Public Types | |
using | ContactPatchRef = std::reference_wrapper< ContactPatch > |
using | ContactPatchRefVector = std::vector< ContactPatchRef > |
using | ContactPatchVector = std::vector< ContactPatch > |
Public Member Functions | |
bool | check (const ContactPatchRequest &request) const |
Return true if this ContactPatchResult is aligned with the ContactPatchRequest given as input. More... | |
void | clear () |
Clears the contact patch result. More... | |
ContactPatch & | contactPatch (const size_t i) |
Getter for the i-th contact patch of the result. More... | |
ContactPatchResult () | |
Default constructor. More... | |
ContactPatchResult (const ContactPatchRequest &request) | |
Constructor using a ContactPatchRequest . More... | |
const ContactPatch & | getContactPatch (const size_t i) const |
Const getter for the i-th contact patch of the result. More... | |
ContactPatchRef | getUnusedContactPatch () |
Returns a new unused contact patch from the internal data vector. More... | |
size_t | numContactPatches () const |
Number of contact patches in the result. More... | |
bool | operator== (const ContactPatchResult &other) const |
Whether two ContactPatchResult are identical or not. More... | |
void | set (const ContactPatchRequest &request) |
Set up a ContactPatchResult from a ContactPatchRequest More... | |
void | swapObjects () |
Repositions the ContactPatch when they get inverted during their construction. More... | |
Protected Attributes | |
ContactPatchRefVector | m_contact_patches |
Vector of contact patches of the result. More... | |
ContactPatchVector | m_contact_patches_data |
Data container for the vector of contact patches. More... | |
size_t | m_id_available_patch |
Contact patches in m_contact_patches_data can have two statuses: used or unused. This index tracks the first unused patch in the m_contact_patches_data vector. More... | |
Result for a contact patch computation.
Definition at line 822 of file coal/collision_data.h.
using coal::ContactPatchResult::ContactPatchRef = std::reference_wrapper<ContactPatch> |
Definition at line 824 of file coal/collision_data.h.
using coal::ContactPatchResult::ContactPatchRefVector = std::vector<ContactPatchRef> |
Definition at line 825 of file coal/collision_data.h.
using coal::ContactPatchResult::ContactPatchVector = std::vector<ContactPatch> |
Definition at line 823 of file coal/collision_data.h.
|
inline |
Default constructor.
Definition at line 846 of file coal/collision_data.h.
|
inlineexplicit |
Constructor using a ContactPatchRequest
.
Definition at line 853 of file coal/collision_data.h.
|
inline |
Return true if this ContactPatchResult
is aligned with the ContactPatchRequest
given as input.
Definition at line 931 of file coal/collision_data.h.
|
inline |
Clears the contact patch result.
Definition at line 910 of file coal/collision_data.h.
|
inline |
Getter for the i-th contact patch of the result.
Definition at line 896 of file coal/collision_data.h.
|
inline |
Const getter for the i-th contact patch of the result.
Definition at line 882 of file coal/collision_data.h.
|
inline |
Returns a new unused contact patch from the internal data vector.
Definition at line 862 of file coal/collision_data.h.
|
inline |
Number of contact patches in the result.
Definition at line 859 of file coal/collision_data.h.
|
inline |
Whether two ContactPatchResult are identical or not.
Definition at line 948 of file coal/collision_data.h.
|
inline |
Set up a ContactPatchResult
from a ContactPatchRequest
Definition at line 919 of file coal/collision_data.h.
|
inline |
Repositions the ContactPatch when they get inverted during their construction.
Definition at line 966 of file coal/collision_data.h.
|
protected |
Vector of contact patches of the result.
Definition at line 842 of file coal/collision_data.h.
|
protected |
Data container for the vector of contact patches.
CollisionResult
or DistanceResult
, which have a very small memory footprint, contact patches can contain relatively large polytopes. In order to reuse a ContactPatchResult
while avoiding successive mallocs, we have a data container and a vector which points to the currently active patches in this data container. Definition at line 834 of file coal/collision_data.h.
|
protected |
Contact patches in m_contact_patches_data
can have two statuses: used or unused. This index tracks the first unused patch in the m_contact_patches_data
vector.
Definition at line 839 of file coal/collision_data.h.