AGXDynamics  2.31.1.0
agxCollide::GeometryContact Class Reference

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 GeometryContactData DataType
 
typedef GeometryContactInstance InstanceType
 
typedef GeometryContactModel ModelType
 
typedef ContactPoint PointType
 

Public Member Functions

 GeometryContact ()
 Default constructor. More...
 
 GeometryContact (agx::Physics::GeometryContactPtr contact)
 Construct given geometry contact entity data. More...
 
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr & body1 ()
 body1 is the rigid body of geometry1, can be assumed to be a valid rigid body. More...
 
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const & body1 () const
 body1 is the rigid body of geometry1, can be assumed to be a valid rigid body. More...
 
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr & body2 ()
 body2 is the rigid body of geometry2, can be NULL. More...
 
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const & body2 () const
 body2 is the rigid body of geometry2, can be NULL. More...
 
AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr & broadPhasePair ()
 
AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr const & broadPhasePair () const
 
agx::Index calculateIndex () const
 Calculate the index using the indirect id. More...
 
agx::Vec3f calculateRelativeVelocity (size_t pointIndex=0) const
 Calculate the relative velocity in a contact point. More...
 
void clear ()
 Clear contact points. More...
 
AGXPHYSICS_EXPORT agx::UInt32 & constraintIndex ()
 
AGXPHYSICS_EXPORT agx::UInt32 const & constraintIndex () const
 
AGXPHYSICS_EXPORT agx::UInt32 & contactZoneIndex ()
 
AGXPHYSICS_EXPORT agx::UInt32 const & contactZoneIndex () const
 
AGXPHYSICS_EXPORT agx::UInt16 & contactZoneSlot ()
 
AGXPHYSICS_EXPORT agx::UInt16 const & contactZoneSlot () const
 
int contains (agx::RigidBody *body) const
 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). More...
 
int contains (agxCollide::Geometry *geometry) const
 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). 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...
 
AGXPHYSICS_EXPORT void *& customData ()
 
AGXPHYSICS_EXPORT void *const & customData () const
 
template<typename T >
T & dataSet ()
 
template<typename T >
const T & dataSet () const
 
void destroy ()
 Remove the entity from the active storage. More...
 
AGXPHYSICS_EXPORT agx::Bool & enabled ()
 
AGXPHYSICS_EXPORT agx::Bool const & enabled () const
 
agxCollide::Geometry * geometry (size_t ith)
 
const agxCollide::Geometry * geometry (size_t ith) const
 
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry1 ()
 
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry1 () const
 
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry2 ()
 
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry2 () const
 
void * getCustomData ()
 
const void * getCustomData () const
 
GeometryContactData * getData ()
 
const GeometryContactData * getData () const
 
agx::Index getId () const
 
agx::ContactMaterial * getMaterial ()
 If the contact material for this geometry contact is explicit it can be accessed here. More...
 
const agx::ContactMaterial * getMaterial () const
 If the contact material for this geometry contact is explicit it can be accessed here. More...
 
const agx::ContactMaterial * getMaterial (bool) const
 It's not possible to change parameters in an implicit contact material. More...
 
agxData::EntityModel * getModel ()
 
const agxData::EntityModel * getModel () const
 
agxData::EntityStorage * getStorage () const
 
AGXPHYSICS_EXPORT agx::Physics::GraphNodePtr & graphNode ()
 
AGXPHYSICS_EXPORT agx::Physics::GraphNodePtr const & graphNode () const
 
agx::UInt32 hash () const
 
agx::Bool hasImpactingPoints () const
 
AGXPHYSICS_EXPORT agx::Bool & hasInternalMaterial ()
 
AGXPHYSICS_EXPORT agx::Bool const & hasInternalMaterial () const
 
AGXPHYSICS_EXPORT agx::Bool & hasSurfaceVelocity ()
 
AGXPHYSICS_EXPORT agx::Bool const & hasSurfaceVelocity () const
 
AGXPHYSICS_EXPORT agx::Bool & immediately ()
 
AGXPHYSICS_EXPORT agx::Bool const & immediately () const
 
void init (agxData::EntityStorage *storage, agx::Index id)
 Set the target storage and id. More...
 
AGXPHYSICS_EXPORT GeometryContactInstance instance ()
 
AGXPHYSICS_EXPORT const GeometryContactInstance instance () const
 
void invalidate ()
 Invalidate the entity pointer. More...
 
bool isEnabled () const
 
bool isInstanceOf (agxData::EntityModel *model) const
 
bool isValid () const
 
AGXPHYSICS_EXPORT agx::Physics::ContactMaterialPtr & material ()
 
AGXPHYSICS_EXPORT agx::Physics::ContactMaterialPtr const & material () 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 GeometryContactSemantics * operator-> ()
 
AGXPHYSICS_EXPORT const GeometryContactSemantics * operator-> () const
 
bool operator< (const EntityPtr &rhs) const
 
bool operator== (const EntityPtr &rhs) const
 
bool operator> (const EntityPtr &rhs) const
 
ContactPointVector & points ()
 
const ContactPointVector & points () const
 
void print (std::ostream &stream) const
 
void print () const
 
void removeContactPoint (ContactPoint &point)
 remove the specified ContactPoint from the set of contact points. More...
 
agx::RigidBody * rigidBody (size_t ith)
 Returns access to rigid body data. More...
 
const agx::RigidBody * rigidBody (size_t ith) const
 Returns access to rigid body data. More...
 
void setCustomData (void *customData)
 Store custom data for this Contact. More...
 
void setEnable (bool flag)
 Set to false to disable the contact. More...
 
AGXPHYSICS_EXPORT agx::SolveModel *& solveModel ()
 
AGXPHYSICS_EXPORT agx::SolveModel *const & solveModel () const
 
agx::UInt8 state () 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...
 
AGXPHYSICS_EXPORT agx::Bool & usingPPGS ()
 
AGXPHYSICS_EXPORT agx::Bool const & usingPPGS () const
 
void verifyIndex () const
 Check for broken ptr, by verifying that the id is active in the storage. More...
 

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 EntityPtr createWithIndex (EntityStorage *storage, agx::Index index)
 
static void TransformToAscii (void *targetBuffer, const void *sourceBuffer, size_t numElements)
 

Detailed Description

A contact between two geometries.

Definition at line 270 of file Contacts.h.

Member Typedef Documentation

◆ DataType

typedef GeometryContactData agx::Physics::GeometryContactPtr::DataType
inherited

Definition at line 228 of file GeometryContactEntity.h.

◆ InstanceType

typedef GeometryContactInstance agx::Physics::GeometryContactPtr::InstanceType
inherited

Definition at line 229 of file GeometryContactEntity.h.

◆ ModelType

typedef GeometryContactModel agx::Physics::GeometryContactPtr::ModelType
inherited

Definition at line 227 of file GeometryContactEntity.h.

◆ PointType

Member Enumeration Documentation

◆ ContactState

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.

Constructor & Destructor Documentation

◆ GeometryContact() [1/2]

agxCollide::GeometryContact::GeometryContact ( )

Default constructor.

Definition at line 626 of file Contacts.h.

◆ GeometryContact() [2/2]

agxCollide::GeometryContact::GeometryContact ( agx::Physics::GeometryContactPtr  contact)

Construct given geometry contact entity data.

Parameters
contact- other geometry (to copy from)

Definition at line 631 of file Contacts.h.

Member Function Documentation

◆ body1() [1/2]

AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr& agx::Physics::GeometryContactPtr::body1 ( )
inherited

body1 is the rigid body of geometry1, can be assumed to be a valid rigid body.

◆ body1() [2/2]

AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const& agx::Physics::GeometryContactPtr::body1 ( ) const
inherited

body1 is the rigid body of geometry1, can be assumed to be a valid rigid body.

◆ body2() [1/2]

AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr& agx::Physics::GeometryContactPtr::body2 ( )
inherited

body2 is the rigid body of geometry2, can be NULL.

◆ body2() [2/2]

AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const& agx::Physics::GeometryContactPtr::body2 ( ) const
inherited

body2 is the rigid body of geometry2, can be NULL.

◆ broadPhasePair() [1/2]

AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr& agx::Physics::GeometryContactPtr::broadPhasePair ( )
inherited
Returns
reference to the broadPhasePair attribute

Referenced by state().

◆ broadPhasePair() [2/2]

AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr const& agx::Physics::GeometryContactPtr::broadPhasePair ( ) const
inherited
Returns
const reference to the broadPhasePair attribute

◆ calculateIndex()

agx::Index agxData::EntityPtr::calculateIndex ( ) const
inherited

◆ calculateRelativeVelocity()

agx::Vec3f agxCollide::GeometryContact::calculateRelativeVelocity ( size_t  pointIndex = 0) const

Calculate the relative velocity in a contact point.

Parameters
pointIndex- The contact point index in the points array containing all contact points for this pair of geometries.
Returns
relative velocity in world coordinate system.

Definition at line 669 of file Contacts.h.

References geometry(), agx::RigidBody::getAngularVelocity(), agx::RigidBody::getCmPosition(), agxCollide::Geometry::getRigidBody(), agx::RigidBody::getVelocity(), and points().

◆ calculateSurfaceVelocity() [1/2]

static bool agxCollide::GeometryContact::calculateSurfaceVelocity ( const agxCollide::Geometry *  geometry1,
const agxCollide::Geometry *  geometry2,
LocalContactPoint &  p 
)
static

Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.

Returns
false if none of the geometries have surface velocity enabled. Returns false if the resulting velocity.equalsZero()

Referenced by calculateSurfaceVelocity().

◆ calculateSurfaceVelocity() [2/2]

bool agxCollide::GeometryContact::calculateSurfaceVelocity ( const agxCollide::Geometry *  geometry1,
const agxCollide::Geometry *  geometry2,
ContactPoint &  p 
)
inlinestatic

Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.

Returns
false if none of the geometries have surface velocity enabled. Returns false if the resulting velocity.equalsZero()

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

◆ clear()

void agxCollide::GeometryContact::clear ( )

Clear contact points.

◆ constraintIndex() [1/2]

AGXPHYSICS_EXPORT agx::UInt32& agx::Physics::ContactPtr::constraintIndex ( )
inherited
Returns
reference to the constraintIndex attribute

◆ constraintIndex() [2/2]

AGXPHYSICS_EXPORT agx::UInt32 const& agx::Physics::ContactPtr::constraintIndex ( ) const
inherited
Returns
const reference to the constraintIndex attribute

◆ contactZoneIndex() [1/2]

AGXPHYSICS_EXPORT agx::UInt32& agx::Physics::ContactPtr::contactZoneIndex ( )
inherited
Returns
reference to the contactZoneIndex attribute

◆ contactZoneIndex() [2/2]

AGXPHYSICS_EXPORT agx::UInt32 const& agx::Physics::ContactPtr::contactZoneIndex ( ) const
inherited
Returns
const reference to the contactZoneIndex attribute

◆ contactZoneSlot() [1/2]

AGXPHYSICS_EXPORT agx::UInt16& agx::Physics::ContactPtr::contactZoneSlot ( )
inherited
Returns
reference to the contactZoneSlot attribute

◆ contactZoneSlot() [2/2]

AGXPHYSICS_EXPORT agx::UInt16 const& agx::Physics::ContactPtr::contactZoneSlot ( ) const
inherited
Returns
const reference to the contactZoneSlot attribute

◆ contains() [1/2]

int agxCollide::GeometryContact::contains ( agx::RigidBody *  body) const
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)

Parameters
body- the rigid body that you want to look for in this geometry contact
Returns
-1 if 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.

◆ contains() [2/2]

int agxCollide::GeometryContact::contains ( agxCollide::Geometry *  geometry) const
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)

Parameters
geometry- The geometry that you want to look for in this geometry contact
Returns
-1 if 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.

◆ copy() [1/2]

agxData::EntityPtr agxData::EntityPtr::copy ( )
inherited

Create a copy instance in the same storage.

◆ copy() [2/2]

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

Copy instance to another storage.

◆ copyAttributes()

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

Copy instance attributes to an existing target instance.

◆ createWithIndex()

EntityPtr agxData::EntityPtr::createWithIndex ( EntityStorage *  storage,
agx::Index  index 
)
inlinestaticinherited

Definition at line 791 of file EntityStorage.h.

References agxAssert, and agxData::EntityStorage::indexToId().

Referenced by agx::createCell().

◆ customData() [1/2]

AGXPHYSICS_EXPORT void*& agx::Physics::GeometryContactPtr::customData ( )
inherited
Returns
reference to the customData attribute

Referenced by getCustomData(), and setCustomData().

◆ customData() [2/2]

AGXPHYSICS_EXPORT void* const& agx::Physics::GeometryContactPtr::customData ( ) const
inherited
Returns
const reference to the customData attribute

◆ dataSet() [1/2]

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

Definition at line 604 of file EntityStorage.h.

References agxAssert.

◆ dataSet() [2/2]

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

Definition at line 611 of file EntityStorage.h.

◆ destroy()

void agxData::EntityPtr::destroy ( )
inherited

Remove the entity from the active storage.

◆ enabled() [1/2]

AGXPHYSICS_EXPORT agx::Bool& agx::Physics::GeometryContactPtr::enabled ( )
inherited
Returns
reference to the enabled attribute

Referenced by isEnabled(), agxCollide::Space::removeContact(), setCustomData(), and setEnable().

◆ enabled() [2/2]

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::GeometryContactPtr::enabled ( ) const
inherited
Returns
const reference to the enabled attribute

◆ geometry() [1/2]

agxCollide::Geometry * agxCollide::GeometryContact::geometry ( size_t  ith)

◆ geometry() [2/2]

const agxCollide::Geometry * agxCollide::GeometryContact::geometry ( size_t  ith) const
Parameters
ith- index of geometry, 0 or 1.
Returns
const pointer to the ith geometry

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

◆ geometry1() [1/2]

AGXPHYSICS_EXPORT agx::Physics::GeometryPtr& agx::Physics::GeometryContactPtr::geometry1 ( )
inherited
Returns
reference to the geometry1 attribute

Referenced by geometry().

◆ geometry1() [2/2]

AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const& agx::Physics::GeometryContactPtr::geometry1 ( ) const
inherited
Returns
const reference to the geometry1 attribute

◆ geometry2() [1/2]

AGXPHYSICS_EXPORT agx::Physics::GeometryPtr& agx::Physics::GeometryContactPtr::geometry2 ( )
inherited
Returns
reference to the geometry2 attribute

Referenced by geometry().

◆ geometry2() [2/2]

AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const& agx::Physics::GeometryContactPtr::geometry2 ( ) const
inherited
Returns
const reference to the geometry2 attribute

◆ getCustomData() [1/2]

void * agxCollide::GeometryContact::getCustomData ( )
Returns
pointer to custom data (with one data element for each contact point)

Definition at line 720 of file Contacts.h.

References agx::Physics::GeometryContactPtr::customData().

◆ getCustomData() [2/2]

const void * agxCollide::GeometryContact::getCustomData ( ) const
Returns
const pointer to custom data (with one data element for each contact point)

Definition at line 725 of file Contacts.h.

References agx::Physics::GeometryContactPtr::customData().

◆ getData() [1/2]

GeometryContactData* agx::Physics::GeometryContactPtr::getData ( )
inherited

◆ getData() [2/2]

const GeometryContactData* agx::Physics::GeometryContactPtr::getData ( ) const
inherited

◆ getId()

◆ getMaterial() [1/3]

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.

Returns
the explicit contact material if present

Definition at line 758 of file Contacts.h.

References agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().

◆ getMaterial() [2/3]

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.

Returns
the explicit contact material if present

Definition at line 765 of file Contacts.h.

References agx::Physics::ContactPtr::material(), and agx::Physics::ContactMaterialPtr::model().

◆ getMaterial() [3/3]

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.

Returns
the explicit or implicit contact material if present

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

◆ getModel() [1/2]

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

Definition at line 758 of file EntityStorage.h.

◆ getModel() [2/2]

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

Definition at line 763 of file EntityStorage.h.

◆ getStorage()

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

◆ graphNode() [1/2]

AGXPHYSICS_EXPORT agx::Physics::GraphNodePtr& agx::Physics::InteractionPtr::graphNode ( )
inherited
Returns
reference to the graphNode attribute

◆ graphNode() [2/2]

AGXPHYSICS_EXPORT agx::Physics::GraphNodePtr const& agx::Physics::InteractionPtr::graphNode ( ) const
inherited
Returns
const reference to the graphNode attribute

◆ hash()

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

Definition at line 281 of file EntityPtr.h.

References agx::hash().

◆ hasImpactingPoints()

agx::Bool agxCollide::GeometryContact::hasImpactingPoints ( ) const
Note
This state is calculated for the points during solve so the result is only reliable after solve and before next collision detection.
Returns
true if this geometry contact contains at least one contact point with state IMPACTING - otherwise false

◆ hasInternalMaterial() [1/2]

AGXPHYSICS_EXPORT agx::Bool& agx::Physics::GeometryContactPtr::hasInternalMaterial ( )
inherited
Returns
reference to the hasInternalMaterial attribute

Referenced by getMaterial().

◆ hasInternalMaterial() [2/2]

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::GeometryContactPtr::hasInternalMaterial ( ) const
inherited
Returns
const reference to the hasInternalMaterial attribute

◆ hasSurfaceVelocity() [1/2]

AGXPHYSICS_EXPORT agx::Bool& agx::Physics::GeometryContactPtr::hasSurfaceVelocity ( )
inherited
Returns
reference to the hasSurfaceVelocity attribute

Referenced by calculateSurfaceVelocity(), and getMaterial().

◆ hasSurfaceVelocity() [2/2]

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::GeometryContactPtr::hasSurfaceVelocity ( ) const
inherited
Returns
const reference to the hasSurfaceVelocity attribute

◆ immediately() [1/2]

AGXPHYSICS_EXPORT agx::Bool& agx::Physics::GeometryContactPtr::immediately ( )
inherited
Returns
reference to the immediately attribute

Referenced by isEnabled(), and setCustomData().

◆ immediately() [2/2]

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::GeometryContactPtr::immediately ( ) const
inherited
Returns
const reference to the immediately attribute

◆ init()

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

◆ instance() [1/2]

AGXPHYSICS_EXPORT GeometryContactInstance agx::Physics::GeometryContactPtr::instance ( )
inherited

◆ instance() [2/2]

AGXPHYSICS_EXPORT const GeometryContactInstance agx::Physics::GeometryContactPtr::instance ( ) const
inherited

◆ invalidate()

void agxData::EntityPtr::invalidate ( )
inherited

Invalidate the entity pointer.

Definition at line 275 of file EntityPtr.h.

References agx::InvalidIndex.

◆ isEnabled()

bool agxCollide::GeometryContact::isEnabled ( ) const
Returns
True if the contact is enabled.

Definition at line 747 of file Contacts.h.

References AGX_FORCE_INLINE, agx::Physics::GeometryContactPtr::enabled(), and agx::Physics::GeometryContactPtr::immediately().

◆ isInstanceOf()

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.

◆ isValid()

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 bool(), and agxData::EntityPtr::operator!().

◆ material() [1/2]

AGXPHYSICS_EXPORT agx::Physics::ContactMaterialPtr& agx::Physics::ContactPtr::material ( )
inherited
Returns
reference to the material attribute

Referenced by getMaterial().

◆ material() [2/2]

AGXPHYSICS_EXPORT agx::Physics::ContactMaterialPtr const& agx::Physics::ContactPtr::material ( ) const
inherited
Returns
const reference to the material attribute

◆ operator bool()

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

Definition at line 289 of file EntityPtr.h.

References agxData::EntityPtr::isValid().

◆ operator!()

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

Definition at line 288 of file EntityPtr.h.

References agxData::EntityPtr::isValid().

◆ operator!=()

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

◆ operator()() [1/18]

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.

◆ operator()() [2/18]

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

Definition at line 648 of file EntityStorage.h.

◆ operator()() [3/18]

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

Pointer attribute.

Definition at line 654 of file EntityStorage.h.

◆ operator()() [4/18]

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

Definition at line 660 of file EntityStorage.h.

◆ operator()() [5/18]

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

Vector attribute.

◆ operator()() [6/18]

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

◆ operator()() [7/18]

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

HashSet attribute.

◆ operator()() [8/18]

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

◆ operator()() [9/18]

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

Array attribute.

◆ operator()() [10/18]

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

◆ operator()() [11/18]

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(), and agx::Object::getName().

◆ operator()() [12/18]

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

Definition at line 752 of file EntityStorage.h.

◆ operator()() [13/18]

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

Definition at line 667 of file EntityStorage.h.

◆ operator()() [14/18]

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

Definition at line 673 of file EntityStorage.h.

◆ operator()() [15/18]

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

Definition at line 681 of file EntityStorage.h.

◆ operator()() [16/18]

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

Definition at line 687 of file EntityStorage.h.

◆ operator()() [17/18]

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

Definition at line 693 of file EntityStorage.h.

◆ operator()() [18/18]

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

Definition at line 699 of file EntityStorage.h.

◆ operator->() [1/2]

AGXPHYSICS_EXPORT GeometryContactSemantics* agx::Physics::GeometryContactPtr::operator-> ( )
inherited

◆ operator->() [2/2]

AGXPHYSICS_EXPORT const GeometryContactSemantics* agx::Physics::GeometryContactPtr::operator-> ( ) const
inherited

◆ operator<()

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

Definition at line 291 of file EntityPtr.h.

References agxData::EntityPtr::getId().

◆ operator==()

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

◆ operator>()

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

Definition at line 296 of file EntityPtr.h.

References agxData::EntityPtr::getId().

◆ points() [1/2]

ContactPointVector & agxCollide::GeometryContact::points ( )
Returns
a reference to the contact points

Definition at line 710 of file Contacts.h.

References agx::Physics::GeometryContactPtr::points().

Referenced by calculateRelativeVelocity().

◆ points() [2/2]

const ContactPointVector & agxCollide::GeometryContact::points ( ) const
Returns
a const reference to the contact points

Definition at line 715 of file Contacts.h.

References agx::Physics::GeometryContactPtr::points().

◆ print() [1/2]

void agxData::EntityPtr::print ( std::ostream &  stream) const
inherited

◆ print() [2/2]

void agxData::EntityPtr::print ( ) const
inherited

◆ removeContactPoint()

void agxCollide::GeometryContact::removeContactPoint ( ContactPoint &  point)

remove the specified ContactPoint from the set of contact points.

◆ rigidBody() [1/2]

agx::RigidBody * agxCollide::GeometryContact::rigidBody ( size_t  ith)

Returns access to rigid body data.

Parameters
ith- index of RigidBody, 0 or 1.
Returns
pointer to the ith RigidBody high level data

Definition at line 697 of file Contacts.h.

References agxAssert, geometry(), and agxCollide::Geometry::getRigidBody().

◆ rigidBody() [2/2]

const agx::RigidBody * agxCollide::GeometryContact::rigidBody ( size_t  ith) const

Returns access to rigid body data.

Parameters
ith- index of RigidBody, 0 or 1.
Returns
const pointer to the ith RigidBody high level data

Definition at line 703 of file Contacts.h.

References agxAssert, geometry(), and agxCollide::Geometry::getRigidBody().

◆ setCustomData()

void agxCollide::GeometryContact::setCustomData ( void *  customData)
inline

Store custom data for this Contact.

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

◆ setEnable()

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

◆ solveModel() [1/2]

AGXPHYSICS_EXPORT agx::SolveModel*& agx::Physics::InteractionPtr::solveModel ( )
inherited
Returns
reference to the solveModel attribute

◆ solveModel() [2/2]

AGXPHYSICS_EXPORT agx::SolveModel* const& agx::Physics::InteractionPtr::solveModel ( ) const
inherited
Returns
const reference to the solveModel attribute

◆ state()

agx::UInt8 agxCollide::GeometryContact::state ( ) const
Returns
the current of this geometry contact (CONTACT, IMPACT)

Definition at line 800 of file Contacts.h.

References AGX_FORCE_INLINE, agxAssert, agx::Physics::GeometryContactPtr::broadPhasePair(), NO_CONTACT, and agx::Physics::BroadPhasePairPtr::state().

◆ swapId()

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.

◆ swapIndex()

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, and agxData::EntityPtr::calculateIndex().

◆ transfer()

void agxData::EntityPtr::transfer ( agxData::EntityStorage *  target)
inherited

Transfer instance to another storage.

◆ TransformToAscii()

static void agxData::EntityPtr::TransformToAscii ( void *  targetBuffer,
const void *  sourceBuffer,
size_t  numElements 
)
staticinherited

◆ usingPPGS() [1/2]

AGXPHYSICS_EXPORT agx::Bool& agx::Physics::GeometryContactPtr::usingPPGS ( )
inherited
Returns
reference to the usingPPGS attribute

◆ usingPPGS() [2/2]

AGXPHYSICS_EXPORT agx::Bool const& agx::Physics::GeometryContactPtr::usingPPGS ( ) const
inherited
Returns
const reference to the usingPPGS attribute

◆ verifyIndex()

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.


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