AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 }
 
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...
 
AGXPHYSICS_EXPORT agx::Real & area ()
 
AGXPHYSICS_EXPORT agx::Real const & area () const
 
agx::Index calculateIndex () const
 Calculate the index using the indirect id. More...
 
void clear ()
 Clear all values in this contact. 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
 
AGXPHYSICS_EXPORT agx::Real & depth ()
 
AGXPHYSICS_EXPORT agx::Real const & depth () const
 
void destroy ()
 Remove the entity from the active storage. More...
 
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
 
agx::UInt8 & faceFeature (size_t ith)
 
agx::UInt8 const & faceFeature (size_t ith) 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...
 
agx::UInt32 & faceIndex (size_t ith)
 
agx::UInt32 const & faceIndex (size_t ith) const
 
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
 
agx::Vec3 getForce () const
 
agx::Real getForceMagnitude () const
 
agx::Index getId () const
 
agxData::EntityModel * getModel ()
 
const agxData::EntityModel * getModel () const
 
agx::Vec3 getNormalForce () const
 
agx::Real getNormalForceMagnitude () const
 
agxData::EntityStorage * getStorage () 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::UInt32 hash () const
 
agx::Bool hasState (ContactPointState contactPointState) const
 
AGXPHYSICS_EXPORT agx::Vec4i8 & indexSet ()
 
AGXPHYSICS_EXPORT agx::Vec4i8
const & 
indexSet () const
 
void init (agxData::EntityStorage *storage, agx::Index id)
 Set the target storage and id. More...
 
AGXPHYSICS_EXPORT
ContactPointInstance 
instance ()
 
AGXPHYSICS_EXPORT const
ContactPointInstance 
instance () const
 
void invalidate ()
 Invalidate the entity pointer. More...
 
agx::Bool isHolonomic () const
 
bool isInstanceOf (agxData::EntityModel *model) const
 
bool isValid () const
 
agx::Real & localForce (size_t idx)
 
agx::Real localForce (size_t idx) 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
 
 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
 
AGXPHYSICS_EXPORT
ContactPointSemantics * 
operator-> ()
 
AGXPHYSICS_EXPORT const
ContactPointSemantics * 
operator-> () const
 
bool operator< (const EntityPtr &rhs) const
 
bool operator== (const EntityPtr &rhs) const
 
bool operator> (const EntityPtr &rhs) const
 
AGXPHYSICS_EXPORT agx::Vec3 & point ()
 
AGXPHYSICS_EXPORT agx::Vec3 const & point () const
 
void print (std::ostream &stream) const
 
void print () 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
 
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...
 
void swapId (EntityPtr &other)
 Swap id with another instance. More...
 
void swapIndex (EntityPtr &other)
 Swap index with another instance. 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
 
void transfer (agxData::EntityStorage *target)
 Transfer instance to another storage. More...
 
AGXPHYSICS_EXPORT agx::Vec3f & velocity ()
 
AGXPHYSICS_EXPORT agx::Vec3f
const & 
velocity () const
 
void verifyIndex () const
 Check for broken ptr, by verifying that the id is active in the storage. More...
 

Static Public Member Functions

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

Member Typedef Documentation

typedef ContactPointData agx::Physics::ContactPointPtr::DataType
inherited

Definition at line 262 of file ContactPointEntity.h.

typedef ContactPointInstance agx::Physics::ContactPointPtr::InstanceType
inherited

Definition at line 263 of file ContactPointEntity.h.

typedef ContactPointModel agx::Physics::ContactPointPtr::ModelType
inherited

Definition at line 261 of file ContactPointEntity.h.

Member Enumeration Documentation

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

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

Constructor & Destructor Documentation

agxCollide::ContactPoint::ContactPoint ( )
inline

Default constructor.

Definition at line 503 of file Contacts.h.

agxCollide::ContactPoint::ContactPoint ( agx::Physics::ContactPointPtr  contact)
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.

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

Member Function Documentation

AGXPHYSICS_EXPORT agx::Real& agx::Physics::ContactPointPtr::area ( )
inherited
Returns
reference to the area attribute

Referenced by clear().

AGXPHYSICS_EXPORT agx::Real const& agx::Physics::ContactPointPtr::area ( ) const
inherited
Returns
const reference to the area attribute
agx::Index agxData::EntityPtr::calculateIndex ( ) const
inherited
agxData::EntityPtr agxData::EntityPtr::copy ( )
inherited

Create a copy instance in the same storage.

agxData::EntityPtr agxData::EntityPtr::copy ( agxData::EntityStorage *  target)
inherited

Copy instance to another storage.

void agxData::EntityPtr::copyAttributes ( agxData::EntityPtr  source)
inherited

Copy instance attributes to an existing target instance.

EntityPtr agxData::EntityPtr::createWithIndex ( EntityStorage *  storage,
agx::Index  index 
)
inlinestaticinherited
template<typename T >
T & agxData::EntityPtr::dataSet ( )
inherited

Definition at line 604 of file EntityStorage.h.

References agxAssert, and agxData::EntityPtr::getData().

template<typename T >
const T & agxData::EntityPtr::dataSet ( ) const
inherited

Definition at line 611 of file EntityStorage.h.

AGXPHYSICS_EXPORT agx::Real& agx::Physics::ContactPointPtr::depth ( )
inherited
Returns
reference to the depth attribute

Referenced by clear(), and getWitnessPoint().

AGXPHYSICS_EXPORT agx::Real const& agx::Physics::ContactPointPtr::depth ( ) const
inherited
Returns
const reference to the depth attribute
void agxData::EntityPtr::destroy ( )
inherited

Remove the entity from the active storage.

AGXPHYSICS_EXPORT agx::Real& agx::Physics::ContactPointPtr::elasticRestLengthShape1 ( )
inherited
Returns
reference to the elasticRestLengthShape1 attribute
AGXPHYSICS_EXPORT agx::Real const& agx::Physics::ContactPointPtr::elasticRestLengthShape1 ( ) const
inherited
Returns
const reference to the elasticRestLengthShape1 attribute
AGXPHYSICS_EXPORT agx::Real& agx::Physics::ContactPointPtr::elasticRestLengthShape2 ( )
inherited
Returns
reference to the elasticRestLengthShape2 attribute
AGXPHYSICS_EXPORT agx::Real const& agx::Physics::ContactPointPtr::elasticRestLengthShape2 ( ) const
inherited
Returns
const reference to the elasticRestLengthShape2 attribute
AGXPHYSICS_EXPORT agx::Bool& agx::Physics::ContactPointPtr::enabled ( )
inherited
Returns
reference to the enabled attribute

Referenced by clear().

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::ContactPointPtr::enabled ( ) const
inherited
Returns
const reference to the enabled attribute
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 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
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 832 of file Contacts.h.

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

AGXPHYSICS_EXPORT agx::UInt8& agx::Physics::ContactPointPtr::faceFeature1 ( )
inherited

The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh).

Referenced by clear(), and faceFeature().

AGXPHYSICS_EXPORT agx::UInt8 const& agx::Physics::ContactPointPtr::faceFeature1 ( ) const
inherited

The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh).

AGXPHYSICS_EXPORT agx::UInt8& agx::Physics::ContactPointPtr::faceFeature2 ( )
inherited

The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).

Referenced by clear(), and faceFeature().

AGXPHYSICS_EXPORT agx::UInt8 const& agx::Physics::ContactPointPtr::faceFeature2 ( ) const
inherited

The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).

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

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

AGXPHYSICS_EXPORT agx::UInt32& agx::Physics::ContactPointPtr::faceIndex1 ( )
inherited

The face index of shape 1 in contact (e.g. index of triangle for trimesh).

Referenced by clear(), and faceIndex().

AGXPHYSICS_EXPORT agx::UInt32 const& agx::Physics::ContactPointPtr::faceIndex1 ( ) const
inherited

The face index of shape 1 in contact (e.g. index of triangle for trimesh).

AGXPHYSICS_EXPORT agx::UInt32& agx::Physics::ContactPointPtr::faceIndex2 ( )
inherited

The face index of shape 2 in contact (e.g. index of triangle for trimesh).

Referenced by clear(), and faceIndex().

AGXPHYSICS_EXPORT agx::UInt32 const& agx::Physics::ContactPointPtr::faceIndex2 ( ) const
inherited

The face index of shape 2 in contact (e.g. index of triangle for trimesh).

ContactPointData* agx::Physics::ContactPointPtr::getData ( )
inherited
const ContactPointData* agx::Physics::ContactPointPtr::getData ( ) const
inherited
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 548 of file Contacts.h.

References getNormalForce(), and getTangentialForce().

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

Definition at line 554 of file Contacts.h.

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

EntityModel * agxData::EntityPtr::getModel ( )
inherited
Returns
The entity model for this instance.

Definition at line 758 of file EntityStorage.h.

References agxData::EntityStorage::getEntityModel().

const EntityModel * agxData::EntityPtr::getModel ( ) const
inherited

Definition at line 763 of file EntityStorage.h.

References agxData::EntityStorage::getEntityModel().

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

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
Returns
the (unsigned) magnitude of the normal force

Definition at line 570 of file Contacts.h.

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

EntityStorage * agxData::EntityPtr::getStorage ( ) const
inherited
Returns
The storage in which the entity is instantiated. nullptr if invalid pointer.

Definition at line 272 of file EntityPtr.h.

Referenced by agxCollide::CollisionGroupManager::canSetsCollide(), agxData::EntityStorage::dereferenceMultipliedAttribute(), agxData::EntityPtr::operator!=(), and agxData::EntityPtr::operator==().

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

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
Returns
the (unsigned) magnitude of the tangential force (friction force in both U and V)

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
Returns
the (unsigned) magnitude of the tangential force in U-direction (friction force )

Definition at line 584 of file Contacts.h.

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

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

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.

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

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

agx::UInt32 agxData::EntityPtr::hash ( ) const
inherited

Definition at line 281 of file EntityPtr.h.

References agx::hash().

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

Definition at line 602 of file Contacts.h.

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

Referenced by isHolonomic().

AGXPHYSICS_EXPORT agx::Vec4i8& agx::Physics::ContactPointPtr::indexSet ( )
inherited
Returns
reference to the indexSet attribute
AGXPHYSICS_EXPORT agx::Vec4i8 const& agx::Physics::ContactPointPtr::indexSet ( ) const
inherited
Returns
const reference to the indexSet attribute
void agxData::EntityPtr::init ( agxData::EntityStorage *  storage,
agx::Index  id 
)
inherited

Set the target storage and id.

Definition at line 589 of file EntityStorage.h.

Referenced by agxData::EntityPtr::EntityPtr().

AGXPHYSICS_EXPORT ContactPointInstance agx::Physics::ContactPointPtr::instance ( )
inherited
AGXPHYSICS_EXPORT const ContactPointInstance agx::Physics::ContactPointPtr::instance ( ) const
inherited
void agxData::EntityPtr::invalidate ( )
inherited

Invalidate the entity pointer.

Definition at line 275 of file EntityPtr.h.

References agx::InvalidIndex.

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

References hasState(), and NONHOLONOMIC.

bool agxData::EntityPtr::isInstanceOf ( agxData::EntityModel *  model) const
inherited
Returns
True if the pointer is an instance of a specified model or sub-model

Definition at line 785 of file EntityStorage.h.

References agxData::EntityStorage::getEntityModel(), and agx::Model::is().

bool agxData::EntityPtr::isValid ( ) const
inherited
Returns
True if the pointer is valid (non-nullptr)

Definition at line 287 of file EntityPtr.h.

Referenced by agxData::EntityPtr::operator!().

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

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

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

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

AGXPHYSICS_EXPORT agx::Vec3 const& agx::Physics::ContactPointPtr::localForce ( ) const
inherited
Returns
const reference to the localForce attribute
AGXPHYSICS_EXPORT agx::Real& agx::Physics::ContactPointPtr::maxNormalForce ( )
inherited
Returns
reference to the maxNormalForce attribute
AGXPHYSICS_EXPORT agx::Real const& agx::Physics::ContactPointPtr::maxNormalForce ( ) const
inherited
Returns
const reference to the maxNormalForce attribute
AGXPHYSICS_EXPORT agx::Vec3f& agx::Physics::ContactPointPtr::normal ( )
inherited
Returns
reference to the normal attribute

Referenced by clear(), getNormalForce(), and getWitnessPoint().

AGXPHYSICS_EXPORT agx::Vec3f const& agx::Physics::ContactPointPtr::normal ( ) const
inherited
Returns
const reference to the normal attribute
agxData::EntityPtr::operator bool ( ) const
inherited

Definition at line 289 of file EntityPtr.h.

bool agxData::EntityPtr::operator! ( ) const
inherited

Definition at line 288 of file EntityPtr.h.

References agxData::EntityPtr::isValid().

bool agxData::EntityPtr::operator!= ( const EntityPtr &  rhs) const
inherited

Definition at line 306 of file EntityPtr.h.

References agxData::EntityPtr::getId(), and agxData::EntityPtr::getStorage().

template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::ScalarAttributeT< T > *  attribute)
inherited

Access the value of a specific attribute.

Definition at line 642 of file EntityStorage.h.

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::ScalarAttributeT< T > *  attribute) const
inherited

Definition at line 648 of file EntityStorage.h.

template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::PointerAttributeT< T > *  attribute)
inherited

Pointer attribute.

Definition at line 654 of file EntityStorage.h.

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::PointerAttributeT< T > *  attribute) const
inherited

Definition at line 660 of file EntityStorage.h.

template<typename T >
agxData::VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::VectorAttributeT< T > *  attribute)
inherited

Vector attribute.

template<typename T >
const agxData::VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::VectorAttributeT< T > *  attribute) const
inherited
template<typename T >
agxData::HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::HashSetAttributeT< T > *  attribute)
inherited

HashSet attribute.

template<typename T >
const agxData::HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::HashSetAttributeT< T > *  attribute) const
inherited
template<typename T >
agxData::ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::ArrayAttributeT< T > *  attribute)
inherited

Array attribute.

template<typename T >
const agxData::ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const agxData::ArrayAttributeT< T > *  attribute) const
inherited
template<typename T >
T & agxData::EntityPtr::operator() ( const agxData::SharedAttributeT< T > *  attribute)
inherited

Shared attribute.

Definition at line 744 of file EntityStorage.h.

References agxAssert, agxData::Value::get(), agx::Object::getName(), and agx::Component::getObject().

template<typename T >
const T & agxData::EntityPtr::operator() ( const agxData::SharedAttributeT< T > *  attribute) const
inherited

Definition at line 752 of file EntityStorage.h.

template<typename T >
ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const ArrayAttributeT< T > *  attribute)
inherited

Definition at line 667 of file EntityStorage.h.

template<typename T >
const ArrayAttributeT<T>::Type& agxData::EntityPtr::operator() ( const ArrayAttributeT< T > *  attribute) const
inherited

Definition at line 673 of file EntityStorage.h.

template<typename T >
VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const VectorAttributeT< T > *  attribute)
inherited

Definition at line 681 of file EntityStorage.h.

template<typename T >
const VectorAttributeT<T>::Type& agxData::EntityPtr::operator() ( const VectorAttributeT< T > *  attribute) const
inherited

Definition at line 687 of file EntityStorage.h.

template<typename T >
HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const HashSetAttributeT< T > *  attribute)
inherited

Definition at line 693 of file EntityStorage.h.

template<typename T >
const HashSetAttributeT<T>::Type& agxData::EntityPtr::operator() ( const HashSetAttributeT< T > *  attribute) const
inherited

Definition at line 699 of file EntityStorage.h.

AGXPHYSICS_EXPORT ContactPointSemantics* agx::Physics::ContactPointPtr::operator-> ( )
inherited
AGXPHYSICS_EXPORT const ContactPointSemantics* agx::Physics::ContactPointPtr::operator-> ( ) const
inherited
bool agxData::EntityPtr::operator< ( const EntityPtr &  rhs) const
inherited

Definition at line 291 of file EntityPtr.h.

References agxData::EntityPtr::getId().

bool agxData::EntityPtr::operator== ( const EntityPtr &  rhs) const
inherited

Definition at line 301 of file EntityPtr.h.

References agxData::EntityPtr::getId(), and agxData::EntityPtr::getStorage().

bool agxData::EntityPtr::operator> ( const EntityPtr &  rhs) const
inherited

Definition at line 296 of file EntityPtr.h.

References agxData::EntityPtr::getId().

AGXPHYSICS_EXPORT agx::Vec3& agx::Physics::ContactPointPtr::point ( )
inherited
Returns
reference to the point attribute

Referenced by agxCollide::GeometryContact::calculateSurfaceVelocity(), clear(), and getWitnessPoint().

AGXPHYSICS_EXPORT agx::Vec3 const& agx::Physics::ContactPointPtr::point ( ) const
inherited
Returns
const reference to the point attribute
void agxData::EntityPtr::print ( std::ostream &  stream) const
inherited
void agxData::EntityPtr::print ( ) const
inherited
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 612 of file Contacts.h.

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

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

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

AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr& agx::Physics::ContactPointPtr::shape1 ( )
inherited

Shape number 1 in contact.

Referenced by clear(), and shape().

AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const& agx::Physics::ContactPointPtr::shape1 ( ) const
inherited

Shape number 1 in contact.

AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr& agx::Physics::ContactPointPtr::shape2 ( )
inherited

Shape number 2 in contact.

Referenced by clear(), and shape().

AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr const& agx::Physics::ContactPointPtr::shape2 ( ) const
inherited

Shape number 2 in contact.

AGXPHYSICS_EXPORT agx::UInt8& agx::Physics::ContactPointPtr::state ( )
inherited

Contact point state, such as impacting, resting etc.

Referenced by clear(), hasState(), and setIsHolonomic().

AGXPHYSICS_EXPORT agx::UInt8 const& agx::Physics::ContactPointPtr::state ( ) const
inherited

Contact point state, such as impacting, resting etc.

void agxData::EntityPtr::swapId ( EntityPtr &  other)
inherited

Swap id with another instance.

Both must be part of the same storage.

Definition at line 768 of file EntityStorage.h.

References agxAssert.

void agxData::EntityPtr::swapIndex ( EntityPtr &  other)
inherited

Swap index with another instance.

Both must be part of the same storage.

Definition at line 776 of file EntityStorage.h.

References agxAssert, agxData::EntityPtr::calculateIndex(), and agxData::EntityStorage::swapInstances().

AGXPHYSICS_EXPORT agx::Vec3f& agx::Physics::ContactPointPtr::tangentU ( )
inherited
Returns
reference to the tangentU attribute

Referenced by clear(), and getTangentialForce().

AGXPHYSICS_EXPORT agx::Vec3f const& agx::Physics::ContactPointPtr::tangentU ( ) const
inherited
Returns
const reference to the tangentU attribute
AGXPHYSICS_EXPORT agx::Vec3f& agx::Physics::ContactPointPtr::tangentV ( )
inherited
Returns
reference to the tangentV attribute

Referenced by clear(), and getTangentialForce().

AGXPHYSICS_EXPORT agx::Vec3f const& agx::Physics::ContactPointPtr::tangentV ( ) const
inherited
Returns
const reference to the tangentV attribute
void agxData::EntityPtr::transfer ( agxData::EntityStorage *  target)
inherited

Transfer instance to another storage.

static void agxData::EntityPtr::TransformToAscii ( void *  targetBuffer,
const void *  sourceBuffer,
size_t  numElements 
)
staticinherited
AGXPHYSICS_EXPORT agx::Vec3f& agx::Physics::ContactPointPtr::velocity ( )
inherited
Returns
reference to the velocity attribute

Referenced by agxCollide::GeometryContact::calculateSurfaceVelocity(), and clear().

AGXPHYSICS_EXPORT agx::Vec3f const& agx::Physics::ContactPointPtr::velocity ( ) const
inherited
Returns
const reference to the velocity attribute
void agxData::EntityPtr::verifyIndex ( ) const
inherited

Check for broken ptr, by verifying that the id is active in the storage.

Only used in debug mode.

Definition at line 632 of file EntityStorage.h.

References agxAssertN, agx::Path::c_str(), agxData::EntityPtr::calculateIndex(), agx::Object::getPath(), and agxData::EntityStorage::size().


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