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

Request for a contact patch computation. More...

#include <collision_data.h>

Public Member Functions

 ContactPatchRequest (const CollisionRequest &collision_request, size_t num_samples_curved_shapes=ContactPatch::default_preallocated_size, CoalScalar patch_tolerance=1e-3)
 Construct a contact patch request from a collision request. More...
 
 ContactPatchRequest (size_t max_num_patch=1, size_t num_samples_curved_shapes=ContactPatch::default_preallocated_size, CoalScalar patch_tolerance=1e-3)
 Default constructor. More...
 
size_t getNumSamplesCurvedShapes () const
 Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid. More...
 
CoalScalar getPatchTolerance () const
 Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation. More...
 
bool operator== (const ContactPatchRequest &other) const
 Whether two ContactPatchRequest are identical or not. More...
 
void setNumSamplesCurvedShapes (const size_t num_samples_curved_shapes)
 Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid. More...
 
void setPatchTolerance (const CoalScalar patch_tolerance)
 Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation. More...
 

Public Attributes

size_t max_num_patch
 Maximum number of contact patches that will be computed. More...
 

Protected Attributes

size_t m_num_samples_curved_shapes
 Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid. More...
 
CoalScalar m_patch_tolerance
 Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation. More...
 

Detailed Description

Request for a contact patch computation.

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

Constructor & Destructor Documentation

◆ ContactPatchRequest() [1/2]

coal::ContactPatchRequest::ContactPatchRequest ( size_t  max_num_patch = 1,
size_t  num_samples_curved_shapes = ContactPatch::default_preallocated_size,
CoalScalar  patch_tolerance = 1e-3 
)
inlineexplicit

Default constructor.

Parameters
max_num_patchmaximum number of contact patches per collision pair.
max_sub_patch_sizemaximum size of each sub contact patch. Each contact patch contains an internal representation for an inscribed sub contact patch. This allows physics simulation to always work with a predetermined maximum size for each contact patch. A sub contact patch is simply a subset of the vertices of a contact patch.
num_samples_curved_shapesfor shapes like cones and cylinders, which have smooth basis (circles in this case), we need to sample a certain amount of point of this basis.
patch_tolerancethe tolerance below which a point of a shape is considered to belong to the support set of this shape in the direction of the normal. Said otherwise, patch_tolerance determines the "thickness" of the separating plane between shapes of a collision pair.

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

◆ ContactPatchRequest() [2/2]

coal::ContactPatchRequest::ContactPatchRequest ( const CollisionRequest collision_request,
size_t  num_samples_curved_shapes = ContactPatch::default_preallocated_size,
CoalScalar  patch_tolerance = 1e-3 
)
inlineexplicit

Construct a contact patch request from a collision request.

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

Member Function Documentation

◆ getNumSamplesCurvedShapes()

size_t coal::ContactPatchRequest::getNumSamplesCurvedShapes ( ) const
inline

Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid.

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

◆ getPatchTolerance()

CoalScalar coal::ContactPatchRequest::getPatchTolerance ( ) const
inline

Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation.

Note
Needs to be positive.

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

◆ operator==()

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

Whether two ContactPatchRequest are identical or not.

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

◆ setNumSamplesCurvedShapes()

void coal::ContactPatchRequest::setNumSamplesCurvedShapes ( const size_t  num_samples_curved_shapes)
inline

Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid.

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

◆ setPatchTolerance()

void coal::ContactPatchRequest::setPatchTolerance ( const CoalScalar  patch_tolerance)
inline

Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation.

Note
Needs to be positive.

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

Member Data Documentation

◆ m_num_samples_curved_shapes

size_t coal::ContactPatchRequest::m_num_samples_curved_shapes
protected

Maximum samples to compute the support sets of curved shapes, i.e. when the normal is perpendicular to the base of a cylinder. For now, only relevant for Cone and Cylinder. In the future this might be extended to Sphere and Ellipsoid.

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

◆ m_patch_tolerance

CoalScalar coal::ContactPatchRequest::m_patch_tolerance
protected

Tolerance below which points are added to a contact patch. In details, given two shapes S1 and S2, a contact patch is the triple intersection between the separating plane (P) (passing by Contact::pos and supported by Contact::normal), S1 and S2; i.e. a contact patch is P & S1 & S2 if we denote & the set intersection operator. If a point p1 of S1 is at a distance below patch_tolerance from the separating plane, it is taken into account in the computation of the contact patch. Otherwise, it is not used for the computation.

Note
Needs to be positive.

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

◆ max_num_patch

size_t coal::ContactPatchRequest::max_num_patch

Maximum number of contact patches that will be computed.

Definition at line 726 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