|
AGX Dynamics
2.37.2.0
|
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 |
Public Member Functions | |
| ContactPoint () | |
| Default constructor. More... | |
| ContactPoint (agx::Physics::ContactPointPtr contact) | |
| ContactPoint (agx::Vec3 thePoint, agx::Vec3f theNormal, agx::Real theDepth) | |
| Construct given point, normal and depth. More... | |
| void | clear () |
| Clear all values in this contact. More... | |
| agx::UInt8 & | faceFeature (size_t ith) |
| agx::UInt8 const & | faceFeature (size_t ith) const |
| agx::UInt32 & | faceIndex (size_t ith) |
| agx::UInt32 const & | faceIndex (size_t ith) const |
| agx::Vec3 | getForce () const |
| agx::Real | getForceMagnitude () const |
| agx::Vec3 | getNormalForce () const |
| agx::Real | getNormalForceMagnitude () const |
| agx::Vec3 | getTangentialForce () const |
| agx::Real | getTangentialForceMagnitude () const |
| agx::Real | getTangentialForceUMagnitude () const |
| agx::Real | getTangentialForceVMagnitude () const |
| agx::Vec3 | getWitnessPoint (size_t ith) const |
| Get witness point for ith geometry. More... | |
| agx::Bool | hasState (ContactPointState contactPointState) const |
| agx::Bool | isHolonomic () const |
| agx::Real & | localForce (size_t idx) |
| agx::Real | localForce (size_t idx) const |
| void | 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 ). More... | |
| agx::Physics::Geometry::ShapePtr & | shape (size_t ith) |
| agx::Physics::Geometry::ShapePtr const & | shape (size_t ith) const |
Public Member Functions inherited from agx::Physics::ContactPointPtr | |
| AGXPHYSICS_EXPORT | ContactPointPtr () |
| AGXPHYSICS_EXPORT | ContactPointPtr (agxData::EntityStorage *storage, agx::Index id) |
| AGXPHYSICS_EXPORT | ContactPointPtr (const agxData::EntityPtr &ptr) |
| AGXPHYSICS_EXPORT | ContactPointPtr (const agxData::EntityInstance &instance) |
| AGXPHYSICS_EXPORT agx::Real & | area () |
| AGXPHYSICS_EXPORT agx::Real const & | area () const |
| AGXPHYSICS_EXPORT agx::Real & | depth () |
| AGXPHYSICS_EXPORT agx::Real const & | depth () const |
| AGXPHYSICS_EXPORT agx::Real & | elasticRestLengthShape1 () |
| AGXPHYSICS_EXPORT agx::Real const & | elasticRestLengthShape1 () const |
| AGXPHYSICS_EXPORT agx::Real & | elasticRestLengthShape2 () |
| AGXPHYSICS_EXPORT agx::Real const & | elasticRestLengthShape2 () const |
| AGXPHYSICS_EXPORT agx::Bool & | enabled () |
| AGXPHYSICS_EXPORT agx::Bool const & | enabled () const |
| AGXPHYSICS_EXPORT agx::UInt8 & | faceFeature1 () |
| The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt8 const & | faceFeature1 () const |
| The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt8 & | faceFeature2 () |
| The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt8 const & | faceFeature2 () const |
| The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt32 & | faceIndex1 () |
| The face index of shape 1 in contact (e.g. index of triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt32 const & | faceIndex1 () const |
| The face index of shape 1 in contact (e.g. index of triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt32 & | faceIndex2 () |
| The face index of shape 2 in contact (e.g. index of triangle for trimesh). More... | |
| AGXPHYSICS_EXPORT agx::UInt32 const & | faceIndex2 () const |
| The face index of shape 2 in contact (e.g. index of triangle for trimesh). More... | |
| ContactPointData * | getData () |
| const ContactPointData * | getData () const |
| AGXPHYSICS_EXPORT agx::Vec4i8 & | indexSet () |
| AGXPHYSICS_EXPORT agx::Vec4i8 const & | indexSet () const |
| AGXPHYSICS_EXPORT ContactPointInstance | instance () |
| AGXPHYSICS_EXPORT const ContactPointInstance | instance () const |
| AGXPHYSICS_EXPORT agx::Vec3 & | localForce () |
| AGXPHYSICS_EXPORT agx::Vec3 const & | localForce () const |
| AGXPHYSICS_EXPORT agx::Real & | maxNormalForce () |
| AGXPHYSICS_EXPORT agx::Real const & | maxNormalForce () const |
| AGXPHYSICS_EXPORT agx::Vec3f & | normal () |
| AGXPHYSICS_EXPORT agx::Vec3f const & | normal () const |
| AGXPHYSICS_EXPORT ContactPointSemantics * | operator-> () |
| AGXPHYSICS_EXPORT const ContactPointSemantics * | operator-> () const |
| AGXPHYSICS_EXPORT ContactPointPtr & | operator= (const agxData::EntityPtr &ptr) |
| AGXPHYSICS_EXPORT ContactPointPtr & | operator= (const agxData::EntityInstance &instance) |
| AGXPHYSICS_EXPORT agx::Vec3 & | point () |
| AGXPHYSICS_EXPORT agx::Vec3 const & | point () const |
| AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr & | shape1 () |
| Shape number 1 in contact. More... | |
| AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const & | shape1 () const |
| Shape number 1 in contact. More... | |
| AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr & | shape2 () |
| Shape number 2 in contact. More... | |
| AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const & | shape2 () const |
| Shape number 2 in contact. More... | |
| AGXPHYSICS_EXPORT agx::UInt8 & | state () |
| Contact point state, such as impacting, resting etc. More... | |
| AGXPHYSICS_EXPORT agx::UInt8 const & | state () const |
| Contact point state, such as impacting, resting etc. More... | |
| AGXPHYSICS_EXPORT agx::Vec3f & | tangentU () |
| AGXPHYSICS_EXPORT agx::Vec3f const & | tangentU () const |
| AGXPHYSICS_EXPORT agx::Vec3f & | tangentV () |
| AGXPHYSICS_EXPORT agx::Vec3f const & | tangentV () const |
| AGXPHYSICS_EXPORT agx::Vec3f & | velocity () |
| AGXPHYSICS_EXPORT agx::Vec3f const & | velocity () const |
Public Member Functions inherited from agxData::EntityPtr | |
| EntityPtr () | |
| EntityPtr (agxData::EntityStorage *storage, agx::Index id) | |
| EntityPtr (const agxData::EntityPtr &other)=default | |
| EntityPtr (const agxData::EntityInstance &instance) | |
| ~EntityPtr ()=default | |
| agx::Index | calculateIndex () const |
| Calculate the index using the indirect id. More... | |
| agxData::EntityPtr | copy () |
| Create a copy instance in the same storage. More... | |
| agxData::EntityPtr | copy (agxData::EntityStorage *target) |
| Copy instance to another storage. More... | |
| void | copyAttributes (agxData::EntityPtr source) |
| Copy instance attributes to an existing target instance. More... | |
| template<typename T > | |
| T & | dataSet () |
| template<typename T > | |
| const T & | dataSet () const |
| void | destroy () |
| Remove the entity from the active storage. More... | |
| agxData::EntityData * | getData () |
| const agxData::EntityData * | getData () const |
| agx::Index | getId () const |
| agxData::EntityModel * | getModel () |
| const agxData::EntityModel * | getModel () const |
| agxData::EntityStorage * | getStorage () const |
| agx::UInt32 | hash () const |
| void | init (agxData::EntityStorage *storage, agx::Index id) |
| Set the target storage and id. More... | |
| agxData::EntityInstance | instance () |
| const agxData::EntityInstance | instance () const |
| void | invalidate () |
| Invalidate the entity pointer. More... | |
| bool | isInstanceOf (agxData::EntityModel *model) const |
| bool | isValid () const |
| operator bool () const | |
| bool | operator! () const |
| bool | operator!= (const EntityPtr &rhs) const |
| template<typename T > | |
| T & | operator() (const agxData::ScalarAttributeT< T > *attribute) |
| Access the value of a specific attribute. More... | |
| template<typename T > | |
| const T & | operator() (const agxData::ScalarAttributeT< T > *attribute) const |
| template<typename T > | |
| T & | operator() (const agxData::PointerAttributeT< T > *attribute) |
| Pointer attribute. More... | |
| template<typename T > | |
| const T & | operator() (const agxData::PointerAttributeT< T > *attribute) const |
| template<typename T > | |
| agxData::VectorAttributeT< T >::Type & | operator() (const agxData::VectorAttributeT< T > *attribute) |
| Vector attribute. More... | |
| template<typename T > | |
| const agxData::VectorAttributeT< T >::Type & | operator() (const agxData::VectorAttributeT< T > *attribute) const |
| template<typename T > | |
| agxData::HashSetAttributeT< T >::Type & | operator() (const agxData::HashSetAttributeT< T > *attribute) |
| HashSet attribute. More... | |
| template<typename T > | |
| const agxData::HashSetAttributeT< T >::Type & | operator() (const agxData::HashSetAttributeT< T > *attribute) const |
| template<typename T > | |
| agxData::ArrayAttributeT< T >::Type & | operator() (const agxData::ArrayAttributeT< T > *attribute) |
| Array attribute. More... | |
| template<typename T > | |
| const agxData::ArrayAttributeT< T >::Type & | operator() (const agxData::ArrayAttributeT< T > *attribute) const |
| template<typename T > | |
| T & | operator() (const agxData::SharedAttributeT< T > *attribute) |
| Shared attribute. More... | |
| template<typename T > | |
| const T & | operator() (const agxData::SharedAttributeT< T > *attribute) const |
| template<typename T > | |
| ArrayAttributeT< T >::Type & | operator() (const ArrayAttributeT< T > *attribute) |
| template<typename T > | |
| const ArrayAttributeT< T >::Type & | operator() (const ArrayAttributeT< T > *attribute) const |
| template<typename T > | |
| VectorAttributeT< T >::Type & | operator() (const VectorAttributeT< T > *attribute) |
| template<typename T > | |
| const VectorAttributeT< T >::Type & | operator() (const VectorAttributeT< T > *attribute) const |
| template<typename T > | |
| HashSetAttributeT< T >::Type & | operator() (const HashSetAttributeT< T > *attribute) |
| template<typename T > | |
| const HashSetAttributeT< T >::Type & | operator() (const HashSetAttributeT< T > *attribute) const |
| bool | operator< (const EntityPtr &rhs) const |
| EntityPtr & | operator= (const EntityPtr &other)=default |
| EntityPtr & | operator= (EntityPtr &&)=default |
| bool | operator== (const EntityPtr &rhs) const |
| bool | operator> (const EntityPtr &rhs) const |
| void | print (std::ostream &stream) const |
| void | print () const |
| void | swapId (EntityPtr &other) |
| Swap id with another instance. More... | |
| void | swapIndex (EntityPtr &other) |
| Swap index with another instance. More... | |
| void | transfer (agxData::EntityStorage *target) |
| Transfer instance to another storage. More... | |
| void | verifyIndex () const |
| Check for broken ptr, by verifying that the id is active in the storage. More... | |
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.
| 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.
| 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.
| 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.
| 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.
|
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.
| 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 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.
| 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.