|
AGX Dynamics
2.37.3.2
|
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, LocalContactPoint &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, ContactPoint &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 270 of file Contacts.h.
Definition at line 273 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 277 of file Contacts.h.
| agxCollide::GeometryContact::GeometryContact | ( | ) |
Default constructor.
Definition at line 626 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 631 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 669 of file Contacts.h.
References geometry(), agx::RigidBody::getAngularVelocity(), agx::RigidBody::getCmPosition(), agxCollide::Geometry::getRigidBody(), agx::RigidBody::getVelocity(), and points().
|
static |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.
Referenced by calculateSurfaceVelocity().
|
inlinestatic |
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.
Definition at line 687 of file Contacts.h.
References calculateSurfaceVelocity(), agx::Physics::GeometryContactPtr::hasSurfaceVelocity(), agxCollide::LocalContactPoint::point(), agx::Physics::ContactPointPtr::point(), agxCollide::LocalContactPoint::velocity(), and agx::Physics::ContactPointPtr::velocity().
| 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 482 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 489 of file Contacts.h.
| agxCollide::Geometry * agxCollide::GeometryContact::geometry | ( | size_t | ith | ) |
| ith | - index of geometry, 0 or 1. |
Definition at line 637 of file Contacts.h.
References agxAssert, agx::Physics::GeometryContactPtr::geometry1(), agx::Physics::GeometryContactPtr::geometry2(), and agx::Physics::GeometryPtr::model().
Referenced by calculateRelativeVelocity(), geometry(), agxModel::GeometryContactInfo::GeometryContactInfo(), 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 646 of file Contacts.h.
References AGX_FORCE_INLINE, agxAssert, geometry(), agx::Physics::GeometryContactPtr::geometry1(), agx::Physics::GeometryContactPtr::geometry2(), agxCollide::Geometry::getEntity(), and agx::Physics::GeometryPtr::model().
| void * agxCollide::GeometryContact::getCustomData | ( | ) |
Definition at line 720 of file Contacts.h.
References agx::Physics::GeometryContactPtr::customData().
| const void * agxCollide::GeometryContact::getCustomData | ( | ) | const |
Definition at line 725 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 758 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 765 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 772 of file Contacts.h.
References AGX_FORCE_INLINE, agxAssert, agx::Physics::GeometryContactPtr::hasInternalMaterial(), agx::Physics::GeometryContactPtr::hasSurfaceVelocity(), agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().
| agx::Bool agxCollide::GeometryContact::hasImpactingPoints | ( | ) | const |
| bool agxCollide::GeometryContact::isEnabled | ( | ) | const |
Definition at line 747 of file Contacts.h.
References AGX_FORCE_INLINE, agx::Physics::GeometryContactPtr::enabled(), and agx::Physics::GeometryContactPtr::immediately().
| ContactPointVector & agxCollide::GeometryContact::points | ( | ) |
Definition at line 710 of file Contacts.h.
References agx::Physics::GeometryContactPtr::points().
Referenced by calculateRelativeVelocity().
| const ContactPointVector & agxCollide::GeometryContact::points | ( | ) | const |
Definition at line 715 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 697 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 703 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 730 of file Contacts.h.
References AGX_FORCE_INLINE, agx::Physics::GeometryContactPtr::customData(), agx::Physics::GeometryContactPtr::enabled(), and agx::Physics::GeometryContactPtr::immediately().
| void agxCollide::GeometryContact::setEnable | ( | bool | flag | ) |
Set to false to disable the contact.
Definition at line 742 of file Contacts.h.
References agx::Physics::GeometryContactPtr::enabled().
| agx::UInt8 agxCollide::GeometryContact::state | ( | ) | const |
Definition at line 800 of file Contacts.h.
References AGX_FORCE_INLINE, agxAssert, agx::Physics::GeometryContactPtr::broadPhasePair(), NO_CONTACT, and agx::Physics::BroadPhasePairPtr::state().