|
AGX Dynamics 2.38.0.2
|
A contact point in a contact data. More...
#include <Contacts.h>
Inheritance diagram for agxCollide::ContactPoint:Public Types | |
| enum | ContactForceComponents { NORMAL_FORCE = 0 , TANGENTIAL_FORCE_U , TANGENTIAL_FORCE_V } |
| enum | ContactPointState : agx::UInt8 { IMPACTING = 1 << 0 , NONHOLONOMIC = 1 << 1 } |
Public Types inherited from agx::Physics::ContactPointPtr | |
| typedef ContactPointData | DataType |
| typedef ContactPointInstance | InstanceType |
| typedef ContactPointModel | ModelType |
Additional Inherited Members | |
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 point in a contact data.
Definition at line 55 of file Contacts.h.
| Enumerator | |
|---|---|
| NORMAL_FORCE | Normal force. |
| TANGENTIAL_FORCE_U | Tangential force U, orthogonal to the normal force and V. |
| TANGENTIAL_FORCE_V | Tangential force V, orthogonal to the normal force and U. |
Definition at line 58 of file Contacts.h.
Definition at line 65 of file Contacts.h.
|
inline |
Default constructor.
Definition at line 503 of file Contacts.h.
|
inline |
Definition at line 507 of file Contacts.h.
| agxCollide::ContactPoint::ContactPoint | ( | agx::Vec3 | thePoint, |
| agx::Vec3f | theNormal, | ||
| agx::Real | theDepth | ||
| ) |
Construct given point, normal and depth.
| thePoint | - point in world |
| theNormal | - normalized normal in world |
| theDepth | - contact point depth |
| void agxCollide::ContactPoint::clear | ( | ) |
Clear all values in this contact.
Definition at line 512 of file Contacts.h.
References agx::Physics::ContactPointPtr::area(), agx::Physics::ContactPointPtr::depth(), agx::Physics::ContactPointPtr::enabled(), agx::Physics::ContactPointPtr::faceFeature1(), agx::Physics::ContactPointPtr::faceFeature2(), agx::Physics::ContactPointPtr::faceIndex1(), agx::Physics::ContactPointPtr::faceIndex2(), agx::Physics::ContactPointPtr::localForce(), agx::Physics::ContactPointPtr::normal(), agx::Physics::ContactPointPtr::point(), agx::Vec3T< T >::set(), agx::Physics::ContactPointPtr::shape1(), agx::Physics::ContactPointPtr::shape2(), agx::Physics::ContactPointPtr::state(), agx::Physics::ContactPointPtr::tangentU(), agx::Physics::ContactPointPtr::tangentV(), and agx::Physics::ContactPointPtr::velocity().
| agx::UInt8 & agxCollide::ContactPoint::faceFeature | ( | size_t | ith | ) |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 826 of file Contacts.h.
References agx::Physics::ContactPointPtr::faceFeature1(), and agx::Physics::ContactPointPtr::faceFeature2().
| agx::UInt8 const & agxCollide::ContactPoint::faceFeature | ( | size_t | ith | ) | const |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 832 of file Contacts.h.
References agx::Physics::ContactPointPtr::faceFeature1(), and agx::Physics::ContactPointPtr::faceFeature2().
| agx::UInt32 & agxCollide::ContactPoint::faceIndex | ( | size_t | ith | ) |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 814 of file Contacts.h.
References agx::Physics::ContactPointPtr::faceIndex1(), and agx::Physics::ContactPointPtr::faceIndex2().
| agx::UInt32 const & agxCollide::ContactPoint::faceIndex | ( | size_t | ith | ) | const |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 820 of file Contacts.h.
References agx::Physics::ContactPointPtr::faceIndex1(), and agx::Physics::ContactPointPtr::faceIndex2().
| agx::Vec3 agxCollide::ContactPoint::getForce | ( | ) | const |
Definition at line 548 of file Contacts.h.
References getNormalForce(), and getTangentialForce().
| agx::Real agxCollide::ContactPoint::getForceMagnitude | ( | ) | const |
Definition at line 554 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), NORMAL_FORCE, TANGENTIAL_FORCE_U, and TANGENTIAL_FORCE_V.
| agx::Vec3 agxCollide::ContactPoint::getNormalForce | ( | ) | const |
Definition at line 564 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), agx::Physics::ContactPointPtr::normal(), and NORMAL_FORCE.
Referenced by getForce().
| agx::Real agxCollide::ContactPoint::getNormalForceMagnitude | ( | ) | const |
Definition at line 570 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), and NORMAL_FORCE.
| agx::Vec3 agxCollide::ContactPoint::getTangentialForce | ( | ) | const |
Definition at line 576 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), TANGENTIAL_FORCE_U, TANGENTIAL_FORCE_V, agx::Physics::ContactPointPtr::tangentU(), and agx::Physics::ContactPointPtr::tangentV().
Referenced by getForce().
| agx::Real agxCollide::ContactPoint::getTangentialForceMagnitude | ( | ) | const |
Definition at line 596 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), TANGENTIAL_FORCE_U, and TANGENTIAL_FORCE_V.
| agx::Real agxCollide::ContactPoint::getTangentialForceUMagnitude | ( | ) | const |
Definition at line 584 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), and TANGENTIAL_FORCE_U.
| agx::Real agxCollide::ContactPoint::getTangentialForceVMagnitude | ( | ) | const |
Definition at line 590 of file Contacts.h.
References agx::Physics::ContactPointPtr::localForce(), and TANGENTIAL_FORCE_V.
| agx::Vec3 agxCollide::ContactPoint::getWitnessPoint | ( | size_t | ith | ) | const |
Get witness point for ith geometry.
The point is in world coordinates, and at time of collision detection. So it is valid in a PRE-StepEventListener or a ContactEventListener, but e.g. in a POST-StepEventListener the geometries will most likely have moved from the contact.
| ith | - 0 for first, 1 for second, index > 1 will return value for second |
Definition at line 850 of file Contacts.h.
References agx::Physics::ContactPointPtr::depth(), agx::Physics::ContactPointPtr::normal(), and agx::Physics::ContactPointPtr::point().
|
inline |
Definition at line 602 of file Contacts.h.
References agx::Physics::ContactPointPtr::state().
Referenced by isHolonomic().
| agx::Bool agxCollide::ContactPoint::isHolonomic | ( | ) | const |
Definition at line 607 of file Contacts.h.
References hasState(), and NONHOLONOMIC.
Referenced by setIsHolonomic().
| agx::Real & agxCollide::ContactPoint::localForce | ( | size_t | idx | ) |
| idx | - Specifies which direction (see enum ContactForceComponents) |
Definition at line 533 of file Contacts.h.
References agxAssert, and agx::Physics::ContactPointPtr::localForce().
| agx::Real agxCollide::ContactPoint::localForce | ( | size_t | idx | ) | const |
| idx | - Specifies which direction (see enum ContactForceComponents) |
Definition at line 540 of file Contacts.h.
References agxAssert, and agx::Physics::ContactPointPtr::localForce().
| void agxCollide::ContactPoint::setIsHolonomic | ( | agx::Bool | isHolonomic | ) |
Set if contact point should be treated as a holonomic constraint ( regular contact constraint with depth ) or a non-holonomic constraint ( strictly dependent on velocity ).
| isHolonomic | - true if contact should be treated as a holonomic constraint, false if it should be treated as a non-holonomic constraint. ( Default: true ) |
Definition at line 612 of file Contacts.h.
References isHolonomic(), NONHOLONOMIC, and agx::Physics::ContactPointPtr::state().
| agx::Physics::Geometry::ShapePtr & agxCollide::ContactPoint::shape | ( | size_t | ith | ) |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 838 of file Contacts.h.
References agx::Physics::ContactPointPtr::shape1(), and agx::Physics::ContactPointPtr::shape2().
| agx::Physics::Geometry::ShapePtr const & agxCollide::ContactPoint::shape | ( | size_t | ith | ) | const |
| ith | - 0 for first, 1 for second, index > 1 will return reference to second |
Definition at line 844 of file Contacts.h.
References agx::Physics::ContactPointPtr::shape1(), and agx::Physics::ContactPointPtr::shape2().