Public Types | Public Member Functions | Protected Attributes | List of all members
coal::ContactPatchResult Struct Reference

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...
 
ContactPatchcontactPatch (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 ContactPatchgetContactPatch (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...
 

Detailed Description

Result for a contact patch computation.

Definition at line 822 of file coal/collision_data.h.

Member Typedef Documentation

◆ ContactPatchRef

Definition at line 824 of file coal/collision_data.h.

◆ ContactPatchRefVector

Definition at line 825 of file coal/collision_data.h.

◆ ContactPatchVector

Definition at line 823 of file coal/collision_data.h.

Constructor & Destructor Documentation

◆ ContactPatchResult() [1/2]

coal::ContactPatchResult::ContactPatchResult ( )
inline

Default constructor.

Definition at line 846 of file coal/collision_data.h.

◆ ContactPatchResult() [2/2]

coal::ContactPatchResult::ContactPatchResult ( const ContactPatchRequest request)
inlineexplicit

Constructor using a ContactPatchRequest.

Definition at line 853 of file coal/collision_data.h.

Member Function Documentation

◆ check()

bool coal::ContactPatchResult::check ( const ContactPatchRequest request) const
inline

Return true if this ContactPatchResult is aligned with the ContactPatchRequest given as input.

Definition at line 931 of file coal/collision_data.h.

◆ clear()

void coal::ContactPatchResult::clear ( )
inline

Clears the contact patch result.

Definition at line 910 of file coal/collision_data.h.

◆ contactPatch()

ContactPatch& coal::ContactPatchResult::contactPatch ( const size_t  i)
inline

Getter for the i-th contact patch of the result.

Definition at line 896 of file coal/collision_data.h.

◆ getContactPatch()

const ContactPatch& coal::ContactPatchResult::getContactPatch ( const size_t  i) const
inline

Const getter for the i-th contact patch of the result.

Definition at line 882 of file coal/collision_data.h.

◆ getUnusedContactPatch()

ContactPatchRef coal::ContactPatchResult::getUnusedContactPatch ( )
inline

Returns a new unused contact patch from the internal data vector.

Definition at line 862 of file coal/collision_data.h.

◆ numContactPatches()

size_t coal::ContactPatchResult::numContactPatches ( ) const
inline

Number of contact patches in the result.

Definition at line 859 of file coal/collision_data.h.

◆ operator==()

bool coal::ContactPatchResult::operator== ( const ContactPatchResult other) const
inline

Whether two ContactPatchResult are identical or not.

Definition at line 948 of file coal/collision_data.h.

◆ set()

void coal::ContactPatchResult::set ( const ContactPatchRequest request)
inline

Set up a ContactPatchResult from a ContactPatchRequest

Definition at line 919 of file coal/collision_data.h.

◆ swapObjects()

void coal::ContactPatchResult::swapObjects ( )
inline

Repositions the ContactPatch when they get inverted during their construction.

Definition at line 966 of file coal/collision_data.h.

Member Data Documentation

◆ m_contact_patches

ContactPatchRefVector coal::ContactPatchResult::m_contact_patches
protected

Vector of contact patches of the result.

Definition at line 842 of file coal/collision_data.h.

◆ m_contact_patches_data

ContactPatchVector coal::ContactPatchResult::m_contact_patches_data
protected

Data container for the vector of contact patches.

Note
Contrary to 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.

◆ m_id_available_patch

size_t coal::ContactPatchResult::m_id_available_patch
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.


The documentation for this struct was generated from the following file:


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:45:00