|
AGX Dynamics
2.35.0.1
|
A contact between two geometries. More...
#include <Contacts.h>
Inheritance diagram for agxCollide::GeometryContact:Public Types | |
| enum | ContactState { NO_CONTACT = 0 , IMPACT_STATE = 1 , CONTACT_STATE = 2 , SEPARATION_STATE = 3 } |
| Specify the state of the contact. More... | |
| typedef ContactPoint | PointType |
Public Types inherited from agx::Physics::GeometryContactPtr | |
| typedef GeometryContactData | DataType |
| typedef GeometryContactInstance | InstanceType |
| typedef GeometryContactModel | ModelType |
Public Types inherited from agx::Physics::ContactPtr | |
| typedef ContactData | DataType |
| typedef ContactInstance | InstanceType |
| typedef ContactModel | ModelType |
Public Types inherited from agx::Physics::InteractionPtr | |
| typedef InteractionData | DataType |
| typedef InteractionInstance | InstanceType |
| typedef InteractionModel | ModelType |
Static Public Member Functions | |
| static bool | calculateSurfaceVelocity (const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, ContactPoint &p) |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p. More... | |
| static bool | calculateSurfaceVelocity (const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, LocalContactPoint &p) |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p. More... | |
Static Public Member Functions inherited from agxData::EntityPtr | |
| static EntityPtr | createWithIndex (EntityStorage *storage, agx::Index index) |
| static void | TransformToAscii (void *targetBuffer, const void *sourceBuffer, size_t numElements) |
A contact between two geometries.
Definition at line 269 of file Contacts.h.
Definition at line 272 of file Contacts.h.
Specify the state of the contact.
| Enumerator | |
|---|---|
| NO_CONTACT | ! No contact yet |
| IMPACT_STATE | ! First contact |
| CONTACT_STATE | ! Continuous contact |
| SEPARATION_STATE | ! Contact in last time step, now separated |
Definition at line 276 of file Contacts.h.
| agxCollide::GeometryContact::GeometryContact | ( | ) |
Default constructor.
Definition at line 625 of file Contacts.h.
| agxCollide::GeometryContact::GeometryContact | ( | agx::Physics::GeometryContactPtr | contact | ) |
Construct given geometry contact entity data.
| contact | - other geometry (to copy from) |
Definition at line 630 of file Contacts.h.
| agx::Vec3f agxCollide::GeometryContact::calculateRelativeVelocity | ( | size_t | pointIndex = 0 | ) | const |
Calculate the relative velocity in a contact point.
| pointIndex | - The contact point index in the points array containing all contact points for this pair of geometries. |
Definition at line 668 of file Contacts.h.
References geometry(), agx::RigidBody::getAngularVelocity(), agx::RigidBody::getCmPosition(), agxCollide::Geometry::getRigidBody(), agx::RigidBody::getVelocity(), and points().
|
inlinestatic |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.
Definition at line 686 of file Contacts.h.
References calculateSurfaceVelocity(), agx::Physics::GeometryContactPtr::geometry1(), agx::Physics::GeometryContactPtr::geometry2(), agx::Physics::GeometryContactPtr::hasSurfaceVelocity(), agx::Physics::ContactPointPtr::point(), agxCollide::LocalContactPoint::point(), agx::Physics::ContactPointPtr::velocity(), and agxCollide::LocalContactPoint::velocity().
|
static |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.
Referenced by calculateSurfaceVelocity().
| void agxCollide::GeometryContact::clear | ( | ) |
Clear contact points.
|
inline |
Will return -1 if body does not exist in this GeometryContact, 0 if it is the first (index 0) and 1 if it is the second (index 1).
This index (if > -1) can be used to get the rigid body with a call to rigidBody(idx)
| body | - the rigid body that you want to look for in this geometry contact |
body does not exist in this GeometryContact, 0 if it is the first and 1 if it is the second Definition at line 481 of file Contacts.h.
|
inline |
Will return -1 if geometry does not exist in this GeometryContact, 0 if it is the first (index 0) and 1 if it is the second (index 1).
This index (if > -1) can be used to get the geometry with a call to geometry(idx)
| geometry | - The geometry that you want to look for in this geometry contact |
geometry does not exist in this GeometryContact, 0 if it is the first and 1 if it is the second Definition at line 488 of file Contacts.h.
References geometry().
| agxCollide::Geometry * agxCollide::GeometryContact::geometry | ( | size_t | ith | ) |
| ith | - index of geometry, 0 or 1. |
Definition at line 636 of file Contacts.h.
References agxAssert, agx::Physics::GeometryContactPtr::geometry1(), agx::Physics::GeometryContactPtr::geometry2(), and agx::Physics::GeometryPtr::model().
Referenced by agxModel::GeometryContactInfo::GeometryContactInfo(), calculateRelativeVelocity(), contains(), agxSDK::ExecuteFilter::match(), and rigidBody().
| const agxCollide::Geometry * agxCollide::GeometryContact::geometry | ( | size_t | ith | ) | const |
| ith | - index of geometry, 0 or 1. |
Definition at line 645 of file Contacts.h.
References agxAssert, agx::Physics::GeometryContactPtr::geometry1(), agx::Physics::GeometryContactPtr::geometry2(), and agx::Physics::GeometryPtr::model().
| void * agxCollide::GeometryContact::getCustomData | ( | ) |
Definition at line 719 of file Contacts.h.
References agx::Physics::GeometryContactPtr::customData().
| const void * agxCollide::GeometryContact::getCustomData | ( | ) | const |
Definition at line 724 of file Contacts.h.
References agx::Physics::GeometryContactPtr::customData().
| agx::ContactMaterial * agxCollide::GeometryContact::getMaterial | ( | ) |
If the contact material for this geometry contact is explicit it can be accessed here.
If the contact material in this geometry contact is implicit, this method will return 0, and you have to create an explicit contact material with help of agxSDK::MaterialManager::getOrCreateContactMaterial.
Definition at line 757 of file Contacts.h.
References agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().
Referenced by agxSDK::FrictionModelFilter::match().
| const agx::ContactMaterial * agxCollide::GeometryContact::getMaterial | ( | ) | const |
If the contact material for this geometry contact is explicit it can be accessed here.
If the contact material in this geometry contact is implicit, this method will return 0, and you have to create an explicit contact material with help of agxSDK::MaterialManager::getOrCreateContactMaterial.
Definition at line 764 of file Contacts.h.
References agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().
| const agx::ContactMaterial * agxCollide::GeometryContact::getMaterial | ( | bool | ) | const |
It's not possible to change parameters in an implicit contact material.
This method returns any type of contact material but const. It's recommended to use the getMaterial() method, this method is used internally.
Definition at line 771 of file Contacts.h.
References agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().
| agx::Bool agxCollide::GeometryContact::hasImpactingPoints | ( | ) | const |
| bool agxCollide::GeometryContact::isEnabled | ( | ) | const |
Definition at line 746 of file Contacts.h.
References agx::Physics::GeometryContactPtr::enabled().
| ContactPointVector & agxCollide::GeometryContact::points | ( | ) |
Definition at line 709 of file Contacts.h.
References agx::Physics::GeometryContactPtr::points().
Referenced by calculateRelativeVelocity().
| const ContactPointVector & agxCollide::GeometryContact::points | ( | ) | const |
Definition at line 714 of file Contacts.h.
References agx::Physics::GeometryContactPtr::points().
| void agxCollide::GeometryContact::removeContactPoint | ( | ContactPoint & | point | ) |
remove the specified ContactPoint from the set of contact points.
| agx::RigidBody * agxCollide::GeometryContact::rigidBody | ( | size_t | ith | ) |
Returns access to rigid body data.
| ith | - index of RigidBody, 0 or 1. |
Definition at line 696 of file Contacts.h.
References agxAssert, geometry(), and agxCollide::Geometry::getRigidBody().
| const agx::RigidBody * agxCollide::GeometryContact::rigidBody | ( | size_t | ith | ) | const |
Returns access to rigid body data.
| ith | - index of RigidBody, 0 or 1. |
Definition at line 702 of file Contacts.h.
References agxAssert, geometry(), and agxCollide::Geometry::getRigidBody().
|
inline |
Store custom data for this Contact.
| customData | - data to be stored |
Definition at line 729 of file Contacts.h.
References agx::Physics::GeometryContactPtr::customData().
| void agxCollide::GeometryContact::setEnable | ( | bool | flag | ) |
Set to false to disable the contact.
Definition at line 741 of file Contacts.h.
References agx::Physics::GeometryContactPtr::enabled().
| agx::UInt8 agxCollide::GeometryContact::state | ( | ) | const |
Definition at line 799 of file Contacts.h.
References agx::Physics::GeometryContactPtr::broadPhasePair(), NO_CONTACT, and agx::Physics::BroadPhasePairPtr::state().