AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
agxCollide::ContactPoint Class Reference

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.
 
 ContactPoint (agx::Physics::ContactPointPtr contact)
 
 ContactPoint (agx::Vec3 thePoint, agx::Vec3f theNormal, agx::Real theDepth)
 Construct given point, normal and depth.
 
void clear ()
 Clear all values in this contact.
 
agx::UInt8faceFeature (size_t ith)
 
agx::UInt8 const & faceFeature (size_t ith) const
 
agx::UInt32faceIndex (size_t ith)
 
agx::UInt32 const & faceIndex (size_t ith) const
 
agx::Vec3 getForce () const
 
agx::Real getForceMagnitude () const
 
agx::Real getFrictionCoefficient (agx::ContactMaterial::FrictionDirection direction) const
 
agx::Vec3 getNormalForce () const
 
agx::Real getNormalForceMagnitude () const
 
agx::Real getRestitution () const
 
agx::Real getTangentialCohesion (agx::ContactMaterial::FrictionDirection direction) const
 
agx::Vec3 getTangentialForce () const
 
agx::Real getTangentialForceMagnitude () const
 
agx::Real getTangentialForceUMagnitude () const
 
agx::Real getTangentialForceVMagnitude () const
 
agx::Real getTangentialRestitution (agx::ContactMaterial::FrictionDirection direction)
 
agx::Vec3 getWitnessPoint (size_t ith) const
 Get witness point for ith geometry.
 
agx::Real getYoungsModulus () const
 
agx::Bool hasState (ContactPointState contactPointState) const
 
agx::Bool isHolonomic () const
 
agx::ReallocalForce (size_t idx)
 
agx::Real localForce (size_t idx) const
 
void setFrictionCoefficient (agx::Real coefficient, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
 Set the per contact point friction coefficient.
 
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 ).
 
void setRestitution (agx::Real restitution)
 Set the per contact point restitution parameter.
 
void setTangentialCohesion (agx::Real tanCohesion, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
 Set the per contact point tangential cohesion.
 
void setTangentialRestitution (agx::Real restitution, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
 Set the tangential restitution coeffcient for a given tangential direction, or both.
 
void setYoungsModulus (agx::Real youngsModulus)
 Set the per contact point Young's modulus parameter.
 
agx::Physics::Geometry::ShapePtrshape (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::EntityInstance &instance)
 
AGXPHYSICS_EXPORT ContactPointPtr (const agxData::EntityPtr &ptr)
 
AGXPHYSICS_EXPORT agx::Realarea ()
 
AGXPHYSICS_EXPORT agx::Real const & area () const
 
AGXPHYSICS_EXPORT agx::Realdepth ()
 
AGXPHYSICS_EXPORT agx::Real const & depth () const
 
AGXPHYSICS_EXPORT agx::RealelasticRestLengthShape1 ()
 
AGXPHYSICS_EXPORT agx::Real const & elasticRestLengthShape1 () const
 
AGXPHYSICS_EXPORT agx::RealelasticRestLengthShape2 ()
 
AGXPHYSICS_EXPORT agx::Real const & elasticRestLengthShape2 () const
 
AGXPHYSICS_EXPORT agx::Boolenabled ()
 
AGXPHYSICS_EXPORT agx::Bool const & enabled () const
 
AGXPHYSICS_EXPORT agx::UInt8faceFeature1 ()
 The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt8 const & faceFeature1 () const
 The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt8faceFeature2 ()
 The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt8 const & faceFeature2 () const
 The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt32faceIndex1 ()
 The face index of shape 1 in contact (e.g. index of triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt32 const & faceIndex1 () const
 The face index of shape 1 in contact (e.g. index of triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt32faceIndex2 ()
 The face index of shape 2 in contact (e.g. index of triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::UInt32 const & faceIndex2 () const
 The face index of shape 2 in contact (e.g. index of triangle for trimesh).
 
AGXPHYSICS_EXPORT agx::Vec2friction ()
 
AGXPHYSICS_EXPORT agx::Vec2 const & friction () const
 
ContactPointData * getData ()
 
const ContactPointData * getData () const
 
AGXPHYSICS_EXPORT agx::Vec4i8indexSet ()
 
AGXPHYSICS_EXPORT agx::Vec4i8 const & indexSet () const
 
AGXPHYSICS_EXPORT ContactPointInstance instance ()
 
AGXPHYSICS_EXPORT const ContactPointInstance instance () const
 
AGXPHYSICS_EXPORT agx::Vec3localForce ()
 
AGXPHYSICS_EXPORT agx::Vec3 const & localForce () const
 
AGXPHYSICS_EXPORT agx::RealmaxNormalForce ()
 
AGXPHYSICS_EXPORT agx::Real const & maxNormalForce () const
 
AGXPHYSICS_EXPORT agx::Vec3fnormal ()
 
AGXPHYSICS_EXPORT agx::Vec3f const & normal () const
 
AGXPHYSICS_EXPORT ContactPointSemantics * operator-> ()
 
AGXPHYSICS_EXPORT const ContactPointSemantics * operator-> () const
 
AGXPHYSICS_EXPORT ContactPointPtroperator= (const agxData::EntityInstance &instance)
 
AGXPHYSICS_EXPORT ContactPointPtroperator= (const agxData::EntityPtr &ptr)
 
AGXPHYSICS_EXPORT agx::Vec3point ()
 
AGXPHYSICS_EXPORT agx::Vec3 const & point () const
 
AGXPHYSICS_EXPORT agx::Vec3restitution ()
 
AGXPHYSICS_EXPORT agx::Vec3 const & restitution () const
 
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtrshape1 ()
 Shape number 1 in contact.
 
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const & shape1 () const
 Shape number 1 in contact.
 
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtrshape2 ()
 Shape number 2 in contact.
 
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const & shape2 () const
 Shape number 2 in contact.
 
AGXPHYSICS_EXPORT agx::UInt8state ()
 Contact point state, such as impacting, resting etc.
 
AGXPHYSICS_EXPORT agx::UInt8 const & state () const
 Contact point state, such as impacting, resting etc.
 
AGXPHYSICS_EXPORT agx::Vec2tangentialCohesion ()
 
AGXPHYSICS_EXPORT agx::Vec2 const & tangentialCohesion () const
 
AGXPHYSICS_EXPORT agx::Vec3ftangentU ()
 
AGXPHYSICS_EXPORT agx::Vec3f const & tangentU () const
 
AGXPHYSICS_EXPORT agx::Vec3ftangentV ()
 
AGXPHYSICS_EXPORT agx::Vec3f const & tangentV () const
 
AGXPHYSICS_EXPORT agx::Vec3fvelocity ()
 
AGXPHYSICS_EXPORT agx::Vec3f const & velocity () const
 
AGXPHYSICS_EXPORT agx::RealyoungsModulus ()
 
AGXPHYSICS_EXPORT agx::Real const & youngsModulus () const
 
- Public Member Functions inherited from agxData::EntityPtr
 EntityPtr ()
 
 EntityPtr (agxData::EntityStorage *storage, agx::Index id)
 
 EntityPtr (const agxData::EntityInstance &instance)
 
 EntityPtr (const agxData::EntityPtr &other)=default
 
 ~EntityPtr ()=default
 
agx::Index calculateIndex () const
 Calculate the index using the indirect id.
 
agxData::EntityPtr copy ()
 Create a copy instance in the same storage.
 
agxData::EntityPtr copy (agxData::EntityStorage *target)
 Copy instance to another storage.
 
void copyAttributes (agxData::EntityPtr source)
 Copy instance attributes to an existing target instance.
 
template<typename T >
T & dataSet ()
 
template<typename T >
const T & dataSet () const
 
void destroy ()
 Remove the entity from the active storage.
 
agxData::EntityData * getData ()
 
const agxData::EntityData * getData () const
 
agx::Index getId () const
 
agxData::EntityModelgetModel ()
 
const agxData::EntityModelgetModel () const
 
agxData::EntityStoragegetStorage () const
 
agx::UInt32 hash () const
 
void init (agxData::EntityStorage *storage, agx::Index id)
 Set the target storage and id.
 
agxData::EntityInstance instance ()
 
const agxData::EntityInstance instance () const
 
void invalidate ()
 Invalidate the entity pointer.
 
bool isInstanceOf (agxData::EntityModel *model) const
 
bool isValid () const
 
 operator bool () const
 
bool operator! () const
 
bool operator!= (const EntityPtr &rhs) const
 
template<typename T >
agxData::ArrayAttributeT< T >::Type & operator() (const agxData::ArrayAttributeT< T > *attribute)
 Array attribute.
 
template<typename T >
const agxData::ArrayAttributeT< T >::Type & operator() (const agxData::ArrayAttributeT< T > *attribute) const
 
template<typename T >
agxData::HashSetAttributeT< T >::Type & operator() (const agxData::HashSetAttributeT< T > *attribute)
 HashSet attribute.
 
template<typename T >
const agxData::HashSetAttributeT< T >::Type & operator() (const agxData::HashSetAttributeT< T > *attribute) const
 
template<typename T >
T & operator() (const agxData::PointerAttributeT< T > *attribute)
 Pointer attribute.
 
template<typename T >
const T & operator() (const agxData::PointerAttributeT< T > *attribute) const
 
template<typename T >
T & operator() (const agxData::ScalarAttributeT< T > *attribute)
 Access the value of a specific attribute.
 
template<typename T >
const T & operator() (const agxData::ScalarAttributeT< T > *attribute) const
 
template<typename T >
T & operator() (const agxData::SharedAttributeT< T > *attribute)
 Shared attribute.
 
template<typename T >
const T & operator() (const agxData::SharedAttributeT< T > *attribute) const
 
template<typename T >
agxData::VectorAttributeT< T >::Type & operator() (const agxData::VectorAttributeT< T > *attribute)
 Vector attribute.
 
template<typename T >
const agxData::VectorAttributeT< T >::Type & operator() (const agxData::VectorAttributeT< 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 >
HashSetAttributeT< T >::Type & operator() (const HashSetAttributeT< T > *attribute)
 
template<typename T >
const HashSetAttributeT< T >::Type & operator() (const HashSetAttributeT< 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
 
bool operator< (const EntityPtr &rhs) const
 
EntityPtroperator= (const EntityPtr &other)=default
 
EntityPtroperator= (EntityPtr &&)=default
 
bool operator== (const EntityPtr &rhs) const
 
bool operator> (const EntityPtr &rhs) const
 
void print () const
 
void print (std::ostream &stream) const
 
void swapId (EntityPtr &other)
 Swap id with another instance.
 
void swapIndex (EntityPtr &other)
 Swap index with another instance.
 
void transfer (agxData::EntityStorage *target)
 Transfer instance to another storage.
 
void verifyIndex () const
 Check for broken ptr, by verifying that the id is active in the storage.
 

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)
 

Detailed Description

A contact point in a contact data.

Definition at line 55 of file Contacts.h.

Member Enumeration Documentation

◆ ContactForceComponents

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.

◆ ContactPointState

Enumerator
IMPACTING 

This contact point is impacting - i.e., relative speed along the normal is above some threshold.

This state is calculated by the solver and is updated in the contact point before the post/last callbacks.

NONHOLONOMIC 

This contact point is treated as a non-holonomic constraint in the normal direction - i.e.

a velocity constraint with target velocity 0 ( similar to friction ) where the contact depth is disregarded. This removes the right-hand side in the normal equation for the contact point.

Definition at line 65 of file Contacts.h.

Constructor & Destructor Documentation

◆ ContactPoint() [1/3]

agxCollide::ContactPoint::ContactPoint ( )
inline

Default constructor.

Definition at line 568 of file Contacts.h.

◆ ContactPoint() [2/3]

agxCollide::ContactPoint::ContactPoint ( agx::Physics::ContactPointPtr  contact)
inline

Definition at line 572 of file Contacts.h.

◆ ContactPoint() [3/3]

agxCollide::ContactPoint::ContactPoint ( agx::Vec3  thePoint,
agx::Vec3f  theNormal,
agx::Real  theDepth 
)

Construct given point, normal and depth.

Parameters
thePoint- point in world
theNormal- normalized normal in world
theDepth- contact point depth

Member Function Documentation

◆ clear()

◆ faceFeature() [1/2]

agx::UInt8 & agxCollide::ContactPoint::faceFeature ( size_t  ith)
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
reference to the ith face feature.

Definition at line 891 of file Contacts.h.

References agx::Physics::ContactPointPtr::faceFeature1(), and agx::Physics::ContactPointPtr::faceFeature2().

◆ faceFeature() [2/2]

agx::UInt8 const & agxCollide::ContactPoint::faceFeature ( size_t  ith) const
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
const reference to the ith face feature.

Definition at line 897 of file Contacts.h.

References agx::Physics::ContactPointPtr::faceFeature1(), and agx::Physics::ContactPointPtr::faceFeature2().

◆ faceIndex() [1/2]

agx::UInt32 & agxCollide::ContactPoint::faceIndex ( size_t  ith)
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
reference to the ith face index.

Definition at line 879 of file Contacts.h.

References agx::Physics::ContactPointPtr::faceIndex1(), and agx::Physics::ContactPointPtr::faceIndex2().

◆ faceIndex() [2/2]

agx::UInt32 const & agxCollide::ContactPoint::faceIndex ( size_t  ith) const
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
const reference to the ith face index.

Definition at line 885 of file Contacts.h.

References agx::Physics::ContactPointPtr::faceIndex1(), and agx::Physics::ContactPointPtr::faceIndex2().

◆ getForce()

agx::Vec3 agxCollide::ContactPoint::getForce ( ) const
Returns
The complete (signed) contact force, including both normal and tangential (friction), in the world coordinate system.

Definition at line 613 of file Contacts.h.

References getNormalForce(), and getTangentialForce().

◆ getForceMagnitude()

agx::Real agxCollide::ContactPoint::getForceMagnitude ( ) const
Returns
The complete (unsigned) contact force magnitude, including both normal and tangential (friction).

Definition at line 619 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), NORMAL_FORCE, TANGENTIAL_FORCE_U, and TANGENTIAL_FORCE_V.

◆ getFrictionCoefficient()

agx::Real agxCollide::ContactPoint::getFrictionCoefficient ( agx::ContactMaterial::FrictionDirection  direction) const
Returns
the surface friction parameter

Definition at line 939 of file Contacts.h.

References agx::Physics::ContactPointPtr::friction().

◆ getNormalForce()

agx::Vec3 agxCollide::ContactPoint::getNormalForce ( ) const
Returns
The (signed) normal force in world coordinates.

Definition at line 629 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), agx::Physics::ContactPointPtr::normal(), and NORMAL_FORCE.

Referenced by getForce().

◆ getNormalForceMagnitude()

agx::Real agxCollide::ContactPoint::getNormalForceMagnitude ( ) const
Returns
the (unsigned) magnitude of the normal force

Definition at line 635 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), and NORMAL_FORCE.

◆ getRestitution()

agx::Real agxCollide::ContactPoint::getRestitution ( ) const
Returns
the restitution parameter.

Definition at line 958 of file Contacts.h.

References agx::Physics::ContactPointPtr::restitution().

◆ getTangentialCohesion()

agx::Real agxCollide::ContactPoint::getTangentialCohesion ( agx::ContactMaterial::FrictionDirection  direction) const
Returns
the surface tangential cohesion parameter

Definition at line 988 of file Contacts.h.

References agx::Physics::ContactPointPtr::tangentialCohesion().

◆ getTangentialForce()

agx::Vec3 agxCollide::ContactPoint::getTangentialForce ( ) const
Returns
The (signed) tangential force (friction force) in world coordinates.

Definition at line 641 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().

◆ getTangentialForceMagnitude()

agx::Real agxCollide::ContactPoint::getTangentialForceMagnitude ( ) const
Returns
the (unsigned) magnitude of the tangential force (friction force in both U and V)

Definition at line 661 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), TANGENTIAL_FORCE_U, and TANGENTIAL_FORCE_V.

◆ getTangentialForceUMagnitude()

agx::Real agxCollide::ContactPoint::getTangentialForceUMagnitude ( ) const
Returns
the (unsigned) magnitude of the tangential force in U-direction (friction force )

Definition at line 649 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), and TANGENTIAL_FORCE_U.

◆ getTangentialForceVMagnitude()

agx::Real agxCollide::ContactPoint::getTangentialForceVMagnitude ( ) const
Returns
the (unsigned) magnitude of the tangential force in U-direction (friction force )

Definition at line 655 of file Contacts.h.

References agx::Physics::ContactPointPtr::localForce(), and TANGENTIAL_FORCE_V.

◆ getTangentialRestitution()

agx::Real agxCollide::ContactPoint::getTangentialRestitution ( agx::ContactMaterial::FrictionDirection  direction)
Returns
the tangential restitution parameter for the given tangential direction.

Definition at line 968 of file Contacts.h.

References agx::Physics::ContactPointPtr::restitution().

◆ getWitnessPoint()

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.

Parameters
ith- 0 for first, 1 for second, index > 1 will return value for second
Returns
witness point for ith geometry, in world coordinates at collision detection time.

Definition at line 915 of file Contacts.h.

References agx::Physics::ContactPointPtr::depth(), agx::Physics::ContactPointPtr::normal(), and agx::Physics::ContactPointPtr::point().

◆ getYoungsModulus()

agx::Real agxCollide::ContactPoint::getYoungsModulus ( ) const
Returns
the youngs modulus parameter.

Definition at line 925 of file Contacts.h.

References agx::Physics::ContactPointPtr::youngsModulus().

◆ hasState()

agx::Bool agxCollide::ContactPoint::hasState ( ContactPoint::ContactPointState  contactPointState) const
inline
Returns
true if this contact point has given state

Definition at line 667 of file Contacts.h.

References agx::Physics::ContactPointPtr::state().

Referenced by isHolonomic().

◆ isHolonomic()

agx::Bool agxCollide::ContactPoint::isHolonomic ( ) const
Returns
true if this contact point is treated as a holonomic constraint, non-holonomic ( velocity only, no depth/violation ) if false.

Definition at line 672 of file Contacts.h.

References hasState(), and NONHOLONOMIC.

Referenced by setIsHolonomic().

◆ localForce() [1/2]

agx::Real & agxCollide::ContactPoint::localForce ( size_t  idx)
Parameters
idx- Specifies which direction (see enum ContactForceComponents)
Returns
a reference to the (signed) local force (in coordinate system n, u, v) for the selected component.

Definition at line 598 of file Contacts.h.

References agxAssert, and agx::Physics::ContactPointPtr::localForce().

◆ localForce() [2/2]

agx::Real agxCollide::ContactPoint::localForce ( size_t  idx) const
Parameters
idx- Specifies which direction (see enum ContactForceComponents)
Returns
the (signed) local force (in coordinate system n, u, v) for the selected component.

Definition at line 605 of file Contacts.h.

References agxAssert, and agx::Physics::ContactPointPtr::localForce().

◆ setFrictionCoefficient()

void agxCollide::ContactPoint::setFrictionCoefficient ( agx::Real  coefficient,
agx::ContactMaterial::FrictionDirection  direction = agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY 
)

Set the per contact point friction coefficient.

The value is initialized from the matching contact material parameter. The coefficient is clamped between zero and infinity.

Parameters
coefficientThe new friction coefficient
directionSpecifies for which direction the friction value will be set. Default is BOTH_PRIMARY_AND_SECONDARY.

Definition at line 945 of file Contacts.h.

References agx::clamp(), agx::Physics::ContactPointPtr::friction(), agx::Infinity, and agx::ContactMaterial::SECONDARY_DIRECTION.

◆ setIsHolonomic()

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 ).

Parameters
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 677 of file Contacts.h.

References isHolonomic(), NONHOLONOMIC, and agx::Physics::ContactPointPtr::state().

◆ setRestitution()

void agxCollide::ContactPoint::setRestitution ( agx::Real  restitution)

Set the per contact point restitution parameter.

Value is initially initialized from contact material. The value is clamped between zero and infinity.

Parameters
restitutionThe new restitution value.

Definition at line 963 of file Contacts.h.

References agx::clamp(), agx::Infinity, and agx::Physics::ContactPointPtr::restitution().

◆ setTangentialCohesion()

void agxCollide::ContactPoint::setTangentialCohesion ( agx::Real  tanCohesion,
agx::ContactMaterial::FrictionDirection  direction = agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY 
)

Set the per contact point tangential cohesion.

The value is initialized from the matching contact material parameter.

Parameters
tanCohesion- The new tangential cohesion in the contact point.
direction- Specifies for which direction the tangential cohesion value will be set. Default is BOTH_PRIMARY_AND_SECONDARY.

Definition at line 994 of file Contacts.h.

References agx::clamp(), agx::Infinity, agx::ContactMaterial::SECONDARY_DIRECTION, and agx::Physics::ContactPointPtr::tangentialCohesion().

◆ setTangentialRestitution()

void agxCollide::ContactPoint::setTangentialRestitution ( agx::Real  restitution,
agx::ContactMaterial::FrictionDirection  direction = agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY 
)

Set the tangential restitution coeffcient for a given tangential direction, or both.

The value is initialized from the matching contact material parameter. The value is clamped between zero and infinity.

Parameters
restitutionNew tangential restituion value.
directionSpecifies for which direction the tangential restitution will be set.

Definition at line 974 of file Contacts.h.

References agx::clamp(), agx::Infinity, agx::Physics::ContactPointPtr::restitution(), and agx::ContactMaterial::SECONDARY_DIRECTION.

◆ setYoungsModulus()

void agxCollide::ContactPoint::setYoungsModulus ( agx::Real  youngsModulus)

Set the per contact point Young's modulus parameter.

Value is initially initialized from contact material. The value is clamped between zero and infinity.

Parameters
youngsModulusThe new youngsModulus value.

Definition at line 932 of file Contacts.h.

References agx::Physics::ContactPointPtr::youngsModulus().

◆ shape() [1/2]

agx::Physics::Geometry::ShapePtr & agxCollide::ContactPoint::shape ( size_t  ith)
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
reference to the ith shape.

Definition at line 903 of file Contacts.h.

References agx::Physics::ContactPointPtr::shape1(), and agx::Physics::ContactPointPtr::shape2().

◆ shape() [2/2]

agx::Physics::Geometry::ShapePtr const & agxCollide::ContactPoint::shape ( size_t  ith) const
Parameters
ith- 0 for first, 1 for second, index > 1 will return reference to second
Returns
const reference to the ith shape.

Definition at line 909 of file Contacts.h.

References agx::Physics::ContactPointPtr::shape1(), and agx::Physics::ContactPointPtr::shape2().


The documentation for this class was generated from the following file: