Contact Class Reference
#include <Contact.hh>
Inherited by ConstraintContact, DefaultContact, ForceAContact, ForceBContact, ForceCContact, ForceDContact, FrictionAContact, GenericAContact, GenericBContact, and PureSpringContact.
List of all members.
Detailed Description
Base class for all contact primitives.
This class defines the class interface for all contact primitives within PCM and provides a few common query functions.
Creation, maintenance and destruction of contact related Arachi entities must be handled by the establish() and terminate() methods of derived classes. Implementations of these methods constitutes the bulk of "contact modeling" efforts. The base implementations of these virtual methods provide a simple means to avoid multiple establishment and termination problems for a single contact instance and can be used by derived classes.
Note that while derived classes will capture the charateristics of various contact "primitives", instances of those classes will correspond to actual established contacts during the simulation.
Member Function Documentation
| virtual bool Contact::establish |
( |
DeContactEvent * |
event, |
|
|
Object * |
a, |
|
|
Object * |
b, |
|
|
utils::ConfigFile * |
params |
|
) |
[virtual] |
|
|
|
This method will be called by the creator of the contact object to establish various components necessary for creating the contact. These may include joints and force properties within the Arachi engine as well as other internal details.
The base implementation returns false if the contact was already established and can be used to avoid duplicate establishments for a single contact. |
| virtual DeVector3 Contact::getForce |
( |
void |
|
) |
[inline, virtual] |
|
|
|
method returns the internally generated contact force (with respect to the position of the surface |
| DeVector3 Contact::getNormal |
( |
void |
|
) |
[inline] |
|
|
|
This method returns the initial contact normal in the global reference frame. |
| DeFloat Contact::getNormalForce |
( |
void |
|
) |
[inline] |
|
|
|
This method returns the contact normal force in the global reference frame. |
| Object* Contact::getObjectA |
( |
void |
|
) |
[inline] |
|
|
|
This method returns the first of the objects that initiated the contact |
| Object* Contact::getObjectB |
( |
void |
|
) |
[inline] |
|
|
|
This method returns the second of the objects that initiated the contact |
| DeVector3 Contact::getPosition |
( |
void |
|
) |
[inline] |
|
|
|
This method returns the initial contact point in the global reference frame. |
| bool Contact::isEstablished |
( |
void |
|
) |
[inline] |
|
|
|
This method returns a flag to indicate whether the contact is established or not. |
| DeFrame Contact::pose |
( |
void |
|
) |
|
|
|
|
This method returns the relative pose of the objects involved in the contact at the current time. DeFrame is returned describing Object A in Object B's Frame. It is meant that in this setup Object B will usually be the "fixed" substrate upon which contact is formed. |
| void Contact::printInfo |
( |
void |
|
) |
|
|
|
|
This method prints information about the contact including pose, relpose, and which objects are in contact |
| DeFrame Contact::relpose |
( |
void |
|
) |
|
|
|
|
This method returns the relative pose of the objects involved in the contact with respect to their configuration at the time of collision. DeFrame is returned describing "A with respect to B at current time" with respect to "A with respect to B at time of collision. |
| virtual bool Contact::terminate |
( |
void |
|
) |
[inline, virtual] |
|
|
|
This method will be called when the contact termination condition is detected and the contact object is about to be destroyed. Derived implementations of this method are expected to cleanup joints and force properties within the Arachi engine as well as other internal details.
The base implementation returns false if the contact was already terminated and can be used to avoid faulty terminations for a single contact. |
| virtual bool Contact::update |
( |
void |
|
) |
[virtual] |
|
|
|
This method will be called periodically to update the contact itself. It will be used at the very least to detect when the two objects are no longer in contact in order to determine when the contact should be terminated. It will also be used to change the state of the contact based on various parameters.
The base implementation returns false if the contact should be detroyed and returns true if the update "succeeded" and the contact should remain active. |
| virtual void Contact::update |
( |
DeContactEvent * |
event |
) |
[virtual] |
|
|
|
This method will be called periodically while objects are in contact. It will be used to update various parameters that describe the contact, such as point of contact and contact normal. |
| DeVector6 Contact::velocity |
( |
void |
|
) |
|
|
|
|
This method returns the relative translational and angular velocity of object A wrt to object B. |
SimLib Reference Documentation