DART 6.13.2
|
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>
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 |
Class used to determine the properties of a contact constraint based on the two colliding bodies and information about their contact.
|
explicit |
Constructor.
[in] | parent | Optional 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. |
|
virtualdefault |
|
virtual |
Create the constraint that represents contact between two collision objects.
Reimplemented in dart::constraint::DefaultContactSurfaceHandler.
|
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.
ContactSurfaceHandlerPtr dart::constraint::ContactSurfaceHandler::getParent | ( | ) |
Get the optional parent handler (nullptr if none is set)
void dart::constraint::ContactSurfaceHandler::setParent | ( | ContactSurfaceHandlerPtr | parent | ) |
Set the optional parent handler (ignored if parent.get() == this)
|
friend |
|
protected |
The optional parent handler.