DART 6.13.2
Loading...
Searching...
No Matches
dart::constraint::ContactSurfaceHandler Class Reference

Class used to determine the properties of a contact constraint based on the two colliding bodies and information about their contact. More...

#include <ContactSurface.hpp>

Inheritance diagram for dart::constraint::ContactSurfaceHandler:
dart::constraint::DefaultContactSurfaceHandler

Public Member Functions

 ContactSurfaceHandler (ContactSurfaceHandlerPtr parent=nullptr)
 Constructor.
 
virtual ~ContactSurfaceHandler ()=default
 
virtual ContactSurfaceParams createParams (const collision::Contact &contact, size_t numContactsOnCollisionObject) const
 Create parameters of the contact constraint.
 
virtual ContactConstraintPtr createConstraint (collision::Contact &contact, size_t numContactsOnCollisionObject, double timeStep) const
 Create the constraint that represents contact between two collision objects.
 
ContactSurfaceHandlerPtr getParent ()
 Get the optional parent handler (nullptr if none is set)
 
void setParent (ContactSurfaceHandlerPtr parent)
 Set the optional parent handler (ignored if parent.get() == this)
 

Protected Attributes

ContactSurfaceHandlerPtr mParent
 The optional parent handler.
 

Friends

class ConstraintSolver
 

Detailed Description

Class used to determine the properties of a contact constraint based on the two colliding bodies and information about their contact.

Constructor & Destructor Documentation

◆ ContactSurfaceHandler()

dart::constraint::ContactSurfaceHandler::ContactSurfaceHandler ( ContactSurfaceHandlerPtr  parent = nullptr)
explicit

Constructor.

Parameters
[in]parentOptional parent handler. In ConstraintSolver, the parent handler is automatically set to the previous handler when adding a new one. It is suggested to keep this paradigm if used elsewhere.

◆ ~ContactSurfaceHandler()

virtual dart::constraint::ContactSurfaceHandler::~ContactSurfaceHandler ( )
virtualdefault

Member Function Documentation

◆ createConstraint()

ContactConstraintPtr dart::constraint::ContactSurfaceHandler::createConstraint ( collision::Contact contact,
size_t  numContactsOnCollisionObject,
double  timeStep 
) const
virtual

Create the constraint that represents contact between two collision objects.

Reimplemented in dart::constraint::DefaultContactSurfaceHandler.

◆ createParams()

ContactSurfaceParams dart::constraint::ContactSurfaceHandler::createParams ( const collision::Contact contact,
size_t  numContactsOnCollisionObject 
) const
virtual

Create parameters of the contact constraint.

This method should combine the collision properties of the two colliding bodies and write the combined result in the returned object. It is also passed the total number of contact points reported on the same collision body - that is useful e.g. for normalization of forces by the number of contact points.

Reimplemented in dart::constraint::DefaultContactSurfaceHandler.

◆ getParent()

ContactSurfaceHandlerPtr dart::constraint::ContactSurfaceHandler::getParent ( )

Get the optional parent handler (nullptr if none is set)

◆ setParent()

void dart::constraint::ContactSurfaceHandler::setParent ( ContactSurfaceHandlerPtr  parent)

Set the optional parent handler (ignored if parent.get() == this)

Friends And Related Symbol Documentation

◆ ConstraintSolver

friend class ConstraintSolver
friend

Member Data Documentation

◆ mParent

ContactSurfaceHandlerPtr dart::constraint::ContactSurfaceHandler::mParent
protected

The optional parent handler.