AGXDynamics  2.31.1.0
agxCollide::Space Class Referenceabstract

This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to calculate overlapping Geometry pairs. More...

#include <Space.h>

+ Inheritance diagram for agxCollide::Space:

Public Types

enum  BroadPhaseAlgorithm { INVALID_BROAD_PHASE_ALGORITHM = -1, SWEEP_AND_PRUNE, HIERARCHICAL_GRID }
 Enum for specifying which BroadPhase algorithm space should use. More...
 
typedef agx::observer_ptr< const Event > EventConstObserver
 
typedef agx::ref_ptr< const Event > EventConstRef
 
typedef agx::observer_ptr< Event > EventObserver
 
typedef agx::ref_ptr< Event > EventRef
 
typedef agx::SetVector< GeometryPair > GeometryPairHash
 
typedef Event2< Component *, Object * > ObjectEvent
 Event when adding removing child objects. More...
 
typedef Callback1< Object * > TraverseCallback
 

Public Member Functions

 Space ()
 Default constructor. More...
 
 Space (agx::Device *device)
 Instantiate Space with a specific device. More...
 
bool add (Geometry *geometry)
 Insert a new geometry into the Space so it can collide with other geometries. More...
 
void addGeometryContacts (const LocalGeometryContactVector &localContacts)
 Explicitly add geometry contacts. More...
 
void addListener (EventListener *listener)
 
void addListener (agxCollide::SpaceListener *listener)
 Add a listener to space. More...
 
virtual void addObject (agx::Object *object, bool assignContext=true)
 Add an object to the component. More...
 
 AGX_DECLARE_VECTOR_TYPES (Event)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
virtual String autoComplete (const String &partialName, StringVector &matchingNames) const
 
virtual void buildNavigationTree (agxJson::Value &eNode) const override
 
bool canCollide (const Geometry *g1, const Geometry *g2) const
 Check if two geometries can collide. More...
 
void cleanup ()
 Cleanup the internal state of the object. More...
 
void commitRemovedContacts ()
 Go through all the contact and contact points scheduled for removal and remove them from the list of contacts. More...
 
virtual void configure (TiXmlElement *eComponent) override
 
void configure (Model *model)
 
template<typename F >
void disableForContacts (F relevantCollision)
 If for some reason a geometry or several geometries collides with less geometries now than previously, we need to make sure that previous overlaps are removed, as they might remain otherwise. More...
 
template<typename F >
void enableForContacts (F relevantCollision)
 If for some reason a geometry or several geometries collides with more geometries now than previously, we need to make sure that current overlaps are reported, as they might be ignored otherwise. More...
 
void eraseDisabledGroupPair (agx::UInt32 group1, agx::UInt32 group2)
 Consider using setEnablePair( group1, group2, true ) instead. More...
 
agxCollide::DisabledCollisionsState findDisabledCollisionsState () const
 Find the complete state of disabled collisions, including name <-> name pairs, id <-> id pairs and geometry <-> geometry pairs. More...
 
agx::String fullName () const
 
agx::String fullPath () const
 
agx::String fullPath (const agx::Object *root) const
 
agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getAutoScopedResource (const agx::Path &path)
 
template<typename T >
const T * getAutoScopedResource (const agx::Path &path) const
 
BroadPhaseAlgorithm getBroadPhaseAlgorithm () const
 
const BroadPhasePairVector & getBroadPhasePairs () const
 
virtual const char * getClassName () const
 
GeometryContact getContact (Geometry *g1, Geometry *g2) const
 Returns geometry contact between two geometries, if existing. More...
 
agx::UInt getContactReductionBinResolution () const
 
agx::UInt getContactReductionThreshold () const
 
agx::Object * getContext ()
 
const agx::Object * getContext () const
 
template<typename T >
T * getContext ()
 
template<typename T >
const T * getContext () const
 
agx::Device * getDevice ()
 
const agx::Device * getDevice () const
 
template<typename T >
T * getDevice ()
 
template<typename T >
const T * getDevice () const
 
const GeometryPairHash & getDisabledPairs () const
 
bool getEnableContactReduction () const
 
bool getEnablePair (agx::UInt32 group1, agx::UInt32 group2) const
 Get information if group1 and group2 are allowed to collide. More...
 
bool getEnablePair (const agx::Name &group1, const agx::Name &group2) const
 Get information if group1 and group2 are allowed to collide. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
const GeometryRefVector & getGeometries () const
 
const Geometry * getGeometry (const agx::Name &name) const
 Find (linear search) the first Geometry in space with a matching name. More...
 
Geometry * getGeometry (const agx::Name &name)
 Find (linear search) the first Geometry in space with a matching name. More...
 
const Geometry * getGeometry (const agx::Uuid &uuid) const
 Find (linear search) the first Geometry in space matching the specified uuid. More...
 
Geometry * getGeometry (const agx::Uuid &uuid)
 Find (linear search) the first Geometry in space matching the specified uuid. More...
 
const Geometry * getGeometry (agx::Index id) const
 Find (linear search) the first Geometry in space matching the specified id. More...
 
Geometry * getGeometry (agx::Index id)
 Find (linear search) the first Geometry in space matching the specified id. More...
 
const GeometryContactPtrVector & getGeometryContacts () const
 Access to the vector containing all narrow phase contacts. More...
 
size_t getGeometryContacts (GeometryContactPtrVector &matches, const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr) const
 Extract a vector with all matching geometry contacts involving the two specified geometries. More...
 
size_t getGeometryContacts (GeometryContactPtrVector &matches, const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr) const
 Extract a vector with all matching geometry contacts involving the two specified rigid bodies This method will perform a linear search through all contact points. More...
 
HierarchicalGrid * getHierarchicalGrid ()
 
agx::UInt32 getId () const
 
const agx::Name & getImplementationName () const
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Model * getModel ()
 
const agx::Model * getModel () const
 
const agx::Name & getName () const
 
agx::Object * getNextSibling ()
 
const agx::Object * getNextSibling () const
 
size_t getNumObjects (const agx::Name &name) const
 
agx::Object * getObject (const agx::Name &name, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, size_t index=0) const
 
agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0) const
 
template<typename T >
T * getObject (const agx::Name &name, size_t index=0)
 
template<typename T >
const T * getObject (const agx::Name &name, size_t index=0) const
 
const agx::ObjectRefVector & getObjects () const
 
template<typename T >
void getObjects (agx::ObjectPtrVector &result, bool recursive=false) const
 
void getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const
 
template<typename T >
void getObjects (ObjectPtrVector &result, bool recursive) const
 
agx::Real getOrientedBoundsThreshold () const
 Returns the current threshold for where oriented bounds are created for Geometries. More...
 
const ParticleGeometryContactVector & getParticleGeometryContacts ()
 Returns the current ParticleGeometryContacts in the simulation. More...
 
const ParticlePairContactVector & getParticleParticleContacts ()
 Returns the current ParticleParticle contacts in the simulation. More...
 
agx::Path getPath () const
 
agx::Path getPath (const agx::Object *root) const
 
int getReferenceCount () const
 
agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getResource (const agx::Path &path)
 
template<typename T >
const T * getResource (const agx::Path &path) const
 
virtual Object * getResourceImpl (const Path &path, agx::Model *model) override
 
agx::Object * getRootContext ()
 
const agx::Object * getRootContext () const
 
const SeparationPairVector & getSeparationPairs () const
 
size_t getSeparationPairs (agx::Physics::GeometryPairPtrVector &matches, const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2=nullptr) const
 Extract a new vector including geometries which just recently separated. More...
 
size_t getSeparationPairs (agx::Physics::GeometryPairPtrVector &matches, const agx::RigidBody *body1, const agx::RigidBody *body2=nullptr) const
 Extract a new vector including rigid bodies which just recently separated. More...
 
virtual StorageAgent * getStorageAgent () const =0
 
agxCollide::SweepAndPrune * getSweepAndPrune ()
 
agx::UInt32 getUniqueGroupID ()
 
agx::Uuid getUuid () const
 
bool hasListener (EventListener *listener)
 
bool hasParent (const agx::Object *node) const
 
void insertDisabledGroupPair (agx::UInt32 group1, agx::UInt32 group2)
 Consider using setEnablePair( group1, group2, false ) instead. More...
 
bool intersect (const agx::Vec3 &point, const agx::Vec3 &direction, LocalGeometryContactVector &geometryContacts, LocalParticleGeometryContactVector &particleGeometryContacts, const agx::Real length=FLT_MAX/4)
 Sends a ray into the collision space and returns information about the objects the ray hits. More...
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool isFinished () const
 
bool isUnique () const
 
virtual void printSubtree () const override
 
void printSubtree (std::ostream &stream, int depth=0) const
 
virtual void rebind () override
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
bool remove (Geometry *geometry)
 Remove a geometry from Space. More...
 
void removeAllObjects ()
 Remove all components. More...
 
GeometryContactPtrVector::const_iterator removeContact (GeometryContactPtrVector::const_iterator contact)
 Remove a specified GeometryContact from the list of contacts. More...
 
void removeContact (agx::Physics::GeometryContactPtr contact)
 Schedule a removal of a specified Narrow phase contact, the contact will not be removed until the method commitRemovedContacts() is called (during the next update()) More...
 
void removeListener (EventListener *listener)
 
bool removeListener (agxCollide::SpaceListener *listener)
 Remove a listener from Space. More...
 
virtual void removeObject (agx::Object *object)
 Remove an object from the component. More...
 
void removeObject (const agx::Name &name, size_t index=0)
 Remove an object with a specified name (and optional index) from the component. More...
 
void removeOverlap (agxCollide::Geometry *geometry1, agxCollide::Geometry *geometry2)
 Remove a (Sweep and Prune) bounding overlap, if it exists, between geometry1 and geoemtry2. More...
 
void reportOverlap (agxCollide::Geometry *geometry1, agxCollide::Geometry *geometry2)
 Add an explicit bounding volume overlap between the two specified geometries. More...
 
void resetGeometryCellAssignments (agxCollide::Geometry *geometry)
 
void resetParticleCellAssignments ()
 
virtual void save (TiXmlElement *) const
 
bool setBroadPhaseAlgorithm (BroadPhaseAlgorithm algorithm)
 Specify a new broad phase algorithm implementation. More...
 
void setContactReductionBinResolution (agx::UInt binResolution)
 Specify the default (for this Simulation) resolution used when evaluating contacts for reduction between geometry-geometry contacts. More...
 
void setContactReductionThreshold (agx::UInt threshold)
 Specify the lower threshold for the number of contact points needed per geometry contact in order to do contact reduction per geometry contact. More...
 
virtual void setContext (agx::Object *context)
 
void setEnableCollisions (const Geometry *g1, const Geometry *g2, bool flag)
 Explicitly disable/enable a geometry pair. More...
 
void setEnableContactReduction (bool flag)
 Enable/Disable contact reduction between pairs of geometries. More...
 
void setEnableGeometry (Geometry *geometry, bool flag)
 
void setEnablePair (agx::UInt32 group1, agx::UInt32 group2, bool flag)
 Enable/disable collisions between two geometry group ID:s. More...
 
void setEnablePair (const agx::Name &group1, const agx::Name &group2, bool flag)
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setId (UInt32 id)
 
void setModel (agx::Model *model)
 Set the object model (handled automatically). More...
 
void setName (const agx::Name &name)
 Set the name of the object. More...
 
void setOrientedBoundsThreshold (agx::Real threshold)
 Sets the threshold where oriented bounds are created for Geometries. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 
virtual void snapshot (TiXmlNode *eParent, const String &directory) const override
 
bool testBoundingVolumeOverlap (GeometryPtrVector &testGeometries, GeometryPairVector &geometryPairs, ParticleGeometryPairVector &particleGeometryPairs, bool skip=true)
 Tests a number of geometries for bounding volume overlaps without changing the geometries already in space besides from updating bounding volumes. More...
 
bool testGeometryOverlap (GeometryPtrVector &testGeometries, LocalGeometryContactVector &geometryContacts, LocalParticleGeometryContactVector &particleGeometryContacts, bool skip=true)
 Test if a number of geometries collides with something already present in space without changing space, besides from updating some bounding volumes. More...
 
void traverse (const TraverseCallback &callback)
 
void traverse (ComponentVisitor *)
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void update ()
 Update the contact state of the entire space including Broad Phase and narrow phase. More...
 
void updateBroadPhase ()
 Update the broad-phase state of the space. More...
 
void updateNarrowPhase ()
 Update the narrow phase state, calculating contact data for all overlapping geometry pairs. More...
 

Static Public Member Functions

static Component * _load (TiXmlElement *eComponent, Device *device)
 
static agx::Model * ClassModel ()
 
static agx::String generateName (const agx::String &bindPath)
 
static const HashSet< Object * > & getActiveObjects ()
 
static bool getEnableRebind ()
 Should rebinding be allowed? Right now a global setting. More...
 
static Component * load (const String &path, const Path &_namespace=Path())
 
static Component * load (const String &path, Device *device, const Path &_namespace=Path())
 
static Component * load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path())
 
static Component * load (TiXmlElement *eComponent, Device *device)
 
static Object * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
static Object * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static void load (const String &path, Device *device, ObjectPtrVector &loadedObjects)
 
static TiXmlDocument openDocument (const String &path)
 
static void setEnableRebind (bool flag)
 Sets if rebinding of objects should be allowed (Right now a global setting). More...
 
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Public Attributes

ObjectEvent addObjectEvent
 
ObjectEvent removeObjectEvent
 

Protected Member Functions

virtual ~Space ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
String expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const
 
void generateUuid ()
 
void setDevice (Device *device)
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to calculate overlapping Geometry pairs.

It also contains methods for explicit overlapping tests with rays etc.

Definition at line 81 of file Space.h.

Member Typedef Documentation

◆ EventConstObserver

Definition at line 62 of file Object.h.

◆ EventConstRef

typedef agx::ref_ptr< const Event > agx::Object::EventConstRef
inherited

Definition at line 62 of file Object.h.

◆ EventObserver

Definition at line 62 of file Object.h.

◆ EventRef

Definition at line 62 of file Object.h.

◆ GeometryPairHash

Definition at line 589 of file Space.h.

◆ ObjectEvent

typedef Event2<Component *, Object *> agx::Component::ObjectEvent
inherited

Event when adding removing child objects.

NOTE: Events are triggered recursively up the parent structure Example: B is added to root node A, one event is triggered (A.addObjectEvent(A, B)). Then when C is added to B two events are triggered (B.addObjectEvent(B, C), and A.addObjectEvent(B,C))

Definition at line 61 of file Component.h.

◆ TraverseCallback

typedef Callback1<Object*> agx::Component::TraverseCallback
inherited

Definition at line 141 of file Component.h.

Member Enumeration Documentation

◆ BroadPhaseAlgorithm

Enum for specifying which BroadPhase algorithm space should use.

Enumerator
INVALID_BROAD_PHASE_ALGORITHM 
SWEEP_AND_PRUNE 

SAP good for scenes which are semi stationary.

Good for temporal coherency.

HIERARCHICAL_GRID 

Good for large scale scenes, particle systems where one can expect large motions between time steps.

Definition at line 86 of file Space.h.

Constructor & Destructor Documentation

◆ Space() [1/2]

agxCollide::Space::Space ( )

Default constructor.

◆ Space() [2/2]

agxCollide::Space::Space ( agx::Device *  device)

Instantiate Space with a specific device.

◆ ~Space()

virtual agxCollide::Space::~Space ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ _load()

static Component* agx::Component::_load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited

◆ add()

bool agxCollide::Space::add ( Geometry *  geometry)

Insert a new geometry into the Space so it can collide with other geometries.

Returns
true if geometry is added successfully. False if geometry was already added.

◆ addGeometryContacts()

void agxCollide::Space::addGeometryContacts ( const LocalGeometryContactVector &  localContacts)

Explicitly add geometry contacts.

This must be done after Space::update(), and not from within a ContactEventListener; preferable via agxSDK::StepEventListener::pre(t). Contact materials are not automatically calculated; they must be explicitly set for each contact. Contacts without a contact material will be ignored. Impact state for each LocalGeometryContact has to be set manually by using the 'solveImpact'-member (default: on).

◆ addListener() [1/2]

void agx::Object::addListener ( EventListener *  listener)
inherited

◆ addListener() [2/2]

void agxCollide::Space::addListener ( agxCollide::SpaceListener *  listener)

Add a listener to space.

The listener will be signaled at add/remove geometry events.

◆ addObject()

virtual void agx::Component::addObject ( agx::Object *  object,
bool  assignContext = true 
)
virtualinherited

Add an object to the component.

Parameters
objectThe object to be added
assignContextTrue if the child get the component as the context, set to false to allow 'weak' coupled children

Referenced by agxSDK::StatisticsListenerData< agx::Real >::StatisticsListenerData().

◆ AGX_DECLARE_VECTOR_TYPES()

agx::Object::AGX_DECLARE_VECTOR_TYPES ( Event  )
inherited

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ autoComplete()

virtual String agx::Component::autoComplete ( const String &  partialName,
StringVector &  matchingNames 
) const
virtualinherited

Reimplemented in agx::Namespace.

◆ buildNavigationTree()

virtual void agx::Component::buildNavigationTree ( agxJson::Value &  eNode) const
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agxData::Buffer, and agx::Model.

◆ canCollide()

bool agxCollide::Space::canCollide ( const Geometry *  g1,
const Geometry *  g2 
) const

Check if two geometries can collide.

Following has to be true to make this method return true.

Both geometries have to be enabled if they belong to a group pair that is not disabled g1 != g2. collisions for g1 are not disabled against g2 (g1->setEnableCollisions(g2, false) if they both have a body, that it is not the same body.

Returns
true if the two geometries can collide.

Definition at line 851 of file Space.h.

References AGX_FORCE_INLINE, agx::SetVector< DataT, HashT >::contains(), DOXYGEN_END_INTERNAL_BLOCK, DOXYGEN_START_INTERNAL_BLOCK, and agx::RigidBody::getEnable().

◆ ClassModel()

static agx::Model* agx::Component::ClassModel ( )
staticinherited

◆ cleanup()

void agxCollide::Space::cleanup ( )

Cleanup the internal state of the object.

All Geometries will be removed one by one. The state after calling this method should be the same as creating a new object.

◆ commitRemovedContacts()

void agxCollide::Space::commitRemovedContacts ( )

Go through all the contact and contact points scheduled for removal and remove them from the list of contacts.

◆ configure() [1/2]

virtual void agx::Component::configure ( TiXmlElement *  eComponent)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Clock, agx::Task, agx::Kernel, agx::UnresolvedTask, and agx::Clock.

◆ configure() [2/2]

void agx::Component::configure ( Model *  model)
inherited

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ disableForContacts()

template<typename F >
void agxCollide::Space::disableForContacts ( F  relevantCollision)
inline

If for some reason a geometry or several geometries collides with less geometries now than previously, we need to make sure that previous overlaps are removed, as they might remain otherwise.

Parameters
relevantCollisionA class that has the function const bool operator()(const agxCollide::Geometry*, const agxCollide::Geometry*) that returns whether or not the collision between the two geometries should be reevaluated

Definition at line 448 of file Space.h.

References agx::Vector< T, Allocator >::back(), agx::Container::empty(), agx::Physics::GeometryPairPtr::geometry1(), agx::Physics::GeometryPairPtr::geometry2(), agx::Physics::GeometryPtr::model(), agx::Vector< T, Allocator >::pop_back(), agx::Vector< T, Allocator >::push_back(), agx::Vector< T, Allocator >::reserve(), agxUtil::setEnableCollisions(), and agx::Container::size().

◆ enableForContacts()

template<typename F >
void agxCollide::Space::enableForContacts ( F  relevantCollision)
inline

If for some reason a geometry or several geometries collides with more geometries now than previously, we need to make sure that current overlaps are reported, as they might be ignored otherwise.

Parameters
relevantCollisionA class that has the function const bool operator()(const agxCollide::Geometry*, const agxCollide::Geometry*) that returns whether or not the collision between the two geometries should be reevaluated

Definition at line 418 of file Space.h.

◆ eraseDisabledGroupPair()

void agxCollide::Space::eraseDisabledGroupPair ( agx::UInt32  group1,
agx::UInt32  group2 
)

Consider using setEnablePair( group1, group2, true ) instead.

Similar to setEnablePair( group1, group2, true ) but this method doesn't look for (and adds) broad phase pairs matching the groups. I.e., this method isn't safe to use if you are unsure there are geometries overlapping matching the groups.

Parameters
group1- first group id
group2- second group id
See also
setEnablePair

◆ expandAutoCompletionMatch()

String agx::Component::expandAutoCompletionMatch ( const String &  query,
const StringVector &  matchingNames 
) const
protectedinherited

◆ findDisabledCollisionsState()

agxCollide::DisabledCollisionsState agxCollide::Space::findDisabledCollisionsState ( ) const

Find the complete state of disabled collisions, including name <-> name pairs, id <-> id pairs and geometry <-> geometry pairs.

Returns
current disabled collisions state

◆ fullName()

agx::String agx::Object::fullName ( ) const
inherited
Returns
name:implementation

◆ fullPath() [1/2]

agx::String agx::Object::fullPath ( ) const
inherited
Returns
path:implementation

◆ fullPath() [2/2]

agx::String agx::Object::fullPath ( const agx::Object *  root) const
inherited

◆ generateName()

static agx::String agx::Object::generateName ( const agx::String &  bindPath)
staticinherited

◆ generateUuid()

void agxStream::Serializable::generateUuid ( )
protectedinherited

◆ getActiveObjects()

static const HashSet<Object *>& agx::Object::getActiveObjects ( )
staticinherited

◆ getAutoScopedResource() [1/4]

agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
The resource with the first matching subpath starting from this node and traversing upwards to the root.

◆ getAutoScopedResource() [2/4]

const agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited

◆ getAutoScopedResource() [3/4]

template<typename T >
T * agx::Object::getAutoScopedResource ( const agx::Path &  path)
inherited

Definition at line 428 of file Object.h.

References agx::Referenced::is().

◆ getAutoScopedResource() [4/4]

template<typename T >
const T * agx::Object::getAutoScopedResource ( const agx::Path &  path) const
inherited

Definition at line 435 of file Object.h.

◆ getBroadPhaseAlgorithm()

BroadPhaseAlgorithm agxCollide::Space::getBroadPhaseAlgorithm ( ) const
Returns
The active broad phase algorithm.

◆ getBroadPhasePairs()

const BroadPhasePairVector & agxCollide::Space::getBroadPhasePairs ( ) const
Returns
a vector of the current overlapping bounding volumes.

Definition at line 940 of file Space.h.

◆ getClassName()

virtual const char* agxStream::Serializable::getClassName ( ) const
virtualinherited
Returns
the class name of this class.

Reimplemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxModel::Deformable1DNodeRoute, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agx::UniformGravityField, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

Referenced by agxStream::InputArchive::readRef().

◆ getContact()

GeometryContact agxCollide::Space::getContact ( Geometry *  g1,
Geometry *  g2 
) const

Returns geometry contact between two geometries, if existing.

Parameters
g1The first geometry.
g2The second geometry.
Returns
Geometry contact between two geometries. If no matching geometry contact is found, an empty GeometryContact (GeometryContact()) will get returned. Thus, the return value should be checked for isValid() before being used.
Note
Works only for geometry contacts added by the general collision detection pipeline, not manually added ones; an alternative in that case is to use getGeometryContacts()).

◆ getContactReductionBinResolution()

agx::UInt agxCollide::Space::getContactReductionBinResolution ( ) const
Return values
Howmany bins per dimension for contact reduction between geometry pairs.

Definition at line 983 of file Space.h.

◆ getContactReductionThreshold()

agx::UInt agxCollide::Space::getContactReductionThreshold ( ) const
Returns
Lower threshold number of contact points in a geometry contact in order run contact reduction on it.

◆ getContext() [1/4]

Object * agx::Object::getContext ( )
inherited
Returns
The parent node in the system tree.

Definition at line 373 of file Object.h.

◆ getContext() [2/4]

const Object * agx::Object::getContext ( ) const
inherited

Definition at line 374 of file Object.h.

◆ getContext() [3/4]

template<typename T >
T * agx::Object::getContext ( )
inherited

Definition at line 401 of file Object.h.

◆ getContext() [4/4]

template<typename T >
const T * agx::Object::getContext ( ) const
inherited

Definition at line 407 of file Object.h.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getDevice() [1/4]

Device * agx::Component::getDevice ( )
inherited
Returns
The device which the component stored on.

Definition at line 222 of file Component.h.

◆ getDevice() [2/4]

const Device * agx::Component::getDevice ( ) const
inherited

Definition at line 223 of file Component.h.

◆ getDevice() [3/4]

template<typename T >
T * agx::Component::getDevice ( )
inherited

Definition at line 226 of file Component.h.

References agxAssert.

◆ getDevice() [4/4]

template<typename T >
const T * agx::Component::getDevice ( ) const
inherited

Definition at line 233 of file Component.h.

References agxAssert.

◆ getDisabledPairs()

const GeometryPairHash& agxCollide::Space::getDisabledPairs ( ) const
Returns
an hashtable containing all pairs of disabled geometries

◆ getEnableContactReduction()

bool agxCollide::Space::getEnableContactReduction ( ) const
Returns
Is contact reduction for geometry pairs enabled?

Definition at line 978 of file Space.h.

◆ getEnablePair() [1/2]

bool agxCollide::Space::getEnablePair ( agx::UInt32  group1,
agx::UInt32  group2 
) const

Get information if group1 and group2 are allowed to collide.

Parameters
group1- First id
group2- Second id
Returns
true if the two groupID is allowed to collide, otherwise false.

Definition at line 935 of file Space.h.

◆ getEnablePair() [2/2]

bool agxCollide::Space::getEnablePair ( const agx::Name &  group1,
const agx::Name &  group2 
) const

Get information if group1 and group2 are allowed to collide.

Parameters
group1- First id
group2- Second id
Returns
true if the two groupID is allowed to collide, otherwise false.

Definition at line 928 of file Space.h.

◆ getEnableRebind()

static bool agx::Object::getEnableRebind ( )
staticinherited

Should rebinding be allowed? Right now a global setting.

◆ getEnableSerialization()

bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

◆ getEnableUuidGeneration()

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object

◆ getGeometries()

const GeometryRefVector & agxCollide::Space::getGeometries ( ) const
Returns
vector of geometries which has been added to this space

Definition at line 923 of file Space.h.

◆ getGeometry() [1/6]

const Geometry* agxCollide::Space::getGeometry ( const agx::Name &  name) const

Find (linear search) the first Geometry in space with a matching name.

Parameters
name- name of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometry() [2/6]

Geometry* agxCollide::Space::getGeometry ( const agx::Name &  name)

Find (linear search) the first Geometry in space with a matching name.

Parameters
name- name of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometry() [3/6]

const Geometry* agxCollide::Space::getGeometry ( const agx::Uuid &  uuid) const

Find (linear search) the first Geometry in space matching the specified uuid.

Parameters
uuid- uuid of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometry() [4/6]

Geometry* agxCollide::Space::getGeometry ( const agx::Uuid &  uuid)

Find (linear search) the first Geometry in space matching the specified uuid.

Parameters
uuid- name of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometry() [5/6]

const Geometry* agxCollide::Space::getGeometry ( agx::Index  id) const

Find (linear search) the first Geometry in space matching the specified id.

Parameters
id- id of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometry() [6/6]

Geometry* agxCollide::Space::getGeometry ( agx::Index  id)

Find (linear search) the first Geometry in space matching the specified id.

Parameters
id- name of geometry to search for
Returns
a pointer to the found Geometry, null if not found.

◆ getGeometryContacts() [1/3]

const GeometryContactPtrVector& agxCollide::Space::getGeometryContacts ( ) const

Access to the vector containing all narrow phase contacts.

Returns
A reference to a vector with reference pointers to GeometryContact This vector contain pointers to GeometryContact which are valid during this simulation step only, so never store a pointer to them and use them over several time steps.

◆ getGeometryContacts() [2/3]

size_t agxCollide::Space::getGeometryContacts ( GeometryContactPtrVector &  matches,
const agxCollide::Geometry *  geometry1,
const agxCollide::Geometry *  geometry2 = nullptr 
) const

Extract a vector with all matching geometry contacts involving the two specified geometries.

This method will perform a linear search through all contact points.

Parameters
geometry1- The first specified geometry to search for among geometry contacts
geometry2- The second specified geometry to search for among geometry contacts (if null only match geometry1)
matches- a vector with all matching geometry contact points This vector contain pointers to GeometryContact which are valid during this simulation step only, so never store a pointer to them and use them over several time steps.
Returns
number of matching geometry contacts

◆ getGeometryContacts() [3/3]

size_t agxCollide::Space::getGeometryContacts ( GeometryContactPtrVector &  matches,
const agx::RigidBody *  body1,
const agx::RigidBody *  body2 = nullptr 
) const

Extract a vector with all matching geometry contacts involving the two specified rigid bodies This method will perform a linear search through all contact points.

Parameters
body1- The first specified rigid body to search for among geometry contacts
body2- The second specified rigid body to search for among geometry contacts (if null only match body1)
matches- a vector with all matching geometry contact points This vector contain pointers to GeometryContact which are valid during this simulation step only, so never store a pointer to them and use them over several time steps.
Returns
number of matching geometry contacts

◆ getHierarchicalGrid()

HierarchicalGrid * agxCollide::Space::getHierarchicalGrid ( )
Returns
The hierarchical grid.

Definition at line 993 of file Space.h.

◆ getId()

UInt32 agx::Object::getId ( ) const
inherited
Returns
The global object id.

Definition at line 370 of file Object.h.

Referenced by agxData::EntityStorage::indexToId().

◆ getImplementationName()

const agx::Name& agx::Object::getImplementationName ( ) const
inherited
Returns
The implementation name of the model. Alias for getModel()->getImplementationName()

◆ getIndex()

agx::UInt32 agxStream::Serializable::getIndex ( ) const
inherited

This index is given at creation of this object.

It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

◆ getModel() [1/2]

Model * agx::Object::getModel ( )
inherited
Returns
The object model.

Definition at line 371 of file Object.h.

◆ getModel() [2/2]

const Model * agx::Object::getModel ( ) const
inherited

Definition at line 372 of file Object.h.

◆ getName()

const Name & agx::Object::getName ( ) const
inherited
Returns
Then name of the object.

Definition at line 369 of file Object.h.

Referenced by agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().

◆ getNextSibling() [1/2]

agx::Object* agx::Object::getNextSibling ( )
inherited
Returns
The next sibling with identical name.

◆ getNextSibling() [2/2]

const agx::Object* agx::Object::getNextSibling ( ) const
inherited

◆ getNumObjects()

size_t agx::Component::getNumObjects ( const agx::Name &  name) const
inherited
Returns
The number of child objects with a specified name.

◆ getObject() [1/6]

Object * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited
Returns
The child object with specified name (and optional index).

Definition at line 194 of file Component.h.

◆ getObject() [2/6]

const Object * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited

Definition at line 195 of file Component.h.

◆ getObject() [3/6]

Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
)
inherited

Definition at line 197 of file Component.h.

◆ getObject() [4/6]

const Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
) const
inherited

Definition at line 198 of file Component.h.

◆ getObject() [5/6]

template<typename T >
T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited

Definition at line 202 of file Component.h.

◆ getObject() [6/6]

template<typename T >
const T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited

Definition at line 216 of file Component.h.

◆ getObjects() [1/4]

const ObjectRefVector & agx::Component::getObjects ( ) const
inherited
Returns
All child objects.

Definition at line 192 of file Component.h.

Referenced by agx::Component::getObjects().

◆ getObjects() [2/4]

template<typename T >
void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
bool  recursive = false 
) const
inherited
Returns
All child objects of a specified type.

◆ getObjects() [3/4]

void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
const agx::Model *  model,
bool  recursive = false 
) const
inherited

◆ getObjects() [4/4]

template<typename T >
void agx::Component::getObjects ( ObjectPtrVector &  result,
bool  recursive 
) const
inherited

Definition at line 241 of file Component.h.

References agx::Component::getObjects().

◆ getOrientedBoundsThreshold()

agx::Real agxCollide::Space::getOrientedBoundsThreshold ( ) const

Returns the current threshold for where oriented bounds are created for Geometries.

Definition at line 988 of file Space.h.

◆ getParticleGeometryContacts()

const ParticleGeometryContactVector& agxCollide::Space::getParticleGeometryContacts ( )

Returns the current ParticleGeometryContacts in the simulation.

◆ getParticleParticleContacts()

const ParticlePairContactVector& agxCollide::Space::getParticleParticleContacts ( )

Returns the current ParticleParticle contacts in the simulation.

◆ getPath() [1/2]

agx::Path agx::Object::getPath ( ) const
inherited
Returns
The path to the object in the system tree.

Referenced by agxData::EntityStorage::dereferenceMultipliedAttribute(), and agxData::EntityInstance::verifyIndex().

◆ getPath() [2/2]

agx::Path agx::Object::getPath ( const agx::Object *  root) const
inherited
Returns
A relative path from a specified root
Parameters
rootA node along the parent path from this object.

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getResource() [1/4]

agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
A resource in the subtree below this object.

◆ getResource() [2/4]

const agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited

◆ getResource() [3/4]

template<typename T >
T * agx::Object::getResource ( const agx::Path &  path)
inherited

Definition at line 414 of file Object.h.

References agx::Referenced::is().

◆ getResource() [4/4]

template<typename T >
const T * agx::Object::getResource ( const agx::Path &  path) const
inherited

Definition at line 421 of file Object.h.

◆ getResourceImpl()

virtual Object* agx::Component::getResourceImpl ( const Path &  path,
agx::Model *  model 
)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agxData::EntityStorage.

◆ getRootContext() [1/2]

agx::Object* agx::Object::getRootContext ( )
inherited
Returns
The root context.

◆ getRootContext() [2/2]

const agx::Object* agx::Object::getRootContext ( ) const
inherited

◆ getSeparationPairs() [1/3]

const SeparationPairVector & agxCollide::Space::getSeparationPairs ( ) const
Returns
a vector of the geometries which are no longer overlapping (could still have overlapping bounding volumes)

Definition at line 946 of file Space.h.

◆ getSeparationPairs() [2/3]

size_t agxCollide::Space::getSeparationPairs ( agx::Physics::GeometryPairPtrVector &  matches,
const agxCollide::Geometry *  geometry1,
const agxCollide::Geometry *  geometry2 = nullptr 
) const

Extract a new vector including geometries which just recently separated.

Parameters
geometry1- Specifies the first geometry to search for among the separation pairs
geometry2- Specifies the second geometry to search for among the separation pairs, if nullptr then only match geometry1
matches- a vector of the geometries which are no longer overlapping (could still have overlapping bounding volumes)
Returns
size of matching vector

◆ getSeparationPairs() [3/3]

size_t agxCollide::Space::getSeparationPairs ( agx::Physics::GeometryPairPtrVector &  matches,
const agx::RigidBody *  body1,
const agx::RigidBody *  body2 = nullptr 
) const

Extract a new vector including rigid bodies which just recently separated.

Parameters
body1- Specifies the first rigid body to search for among the separation pairs
body2- Specifies the second rigid body to search for among the separation pairs, if nullptr then only match geometry1
matches- a vector of the geometries which are no longer overlapping (could still have overlapping bounding volumes)
Returns
size of matching vector

◆ getStorageAgent()

virtual StorageAgent* agxStream::Serializable::getStorageAgent ( ) const
pure virtualinherited
Returns
the storage agent

Implemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxModel::Deformable1DNodeRoute, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agx::UniformGravityField, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

◆ getSweepAndPrune()

agxCollide::SweepAndPrune* agxCollide::Space::getSweepAndPrune ( )
Returns
a pointer to the Sweep and prune implementation.

◆ getUniqueGroupID()

agx::UInt32 agxCollide::Space::getUniqueGroupID ( )
Returns
a unique group ID starting from 2^31

◆ getUuid()

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

Referenced by agxSDK::UuidHashCollisionFilter::match().

◆ hasListener()

bool agx::Object::hasListener ( EventListener *  listener)
inherited

◆ hasParent()

bool agx::Object::hasParent ( const agx::Object *  node) const
inherited
Returns
True if the specified node is located somewhere in the path above the object.

◆ insertDisabledGroupPair()

void agxCollide::Space::insertDisabledGroupPair ( agx::UInt32  group1,
agx::UInt32  group2 
)

Consider using setEnablePair( group1, group2, false ) instead.

Similar to setEnablePair( group1, group2, false ) but this method doesn't look for (and removes) broad phase pairs matching the groups. I.e., this method isn't safe to use if you are unsure there are geometries overlapping matching the groups.

Parameters
group1- first group id
group2- second group id
See also
setEnablePair

◆ intersect()

bool agxCollide::Space::intersect ( const agx::Vec3 &  point,
const agx::Vec3 &  direction,
LocalGeometryContactVector &  geometryContacts,
LocalParticleGeometryContactVector &  particleGeometryContacts,
const agx::Real  length = FLT_MAX/4 
)

Sends a ray into the collision space and returns information about the objects the ray hits.

The ray does not have to hit anything and the returned contact data can be empty.

Parameters
pointstart point of the ray
directionDirection of the ray
geometryContactsA GeometryContactPtrVector where contact data will be stored for the objects the ray intersected the objects are sorted closest to furthest away
particleGeometryContactsA GeometryContactPtrVector where contact data will be stored for the objects the ray intersected the objects are sorted closest to furthest away
lengthMax length of ray, objects further away than length will not be hit even if they are in the path of the ray
Returns
true if at least one object was intersected, otherwise false

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ isFinished()

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

References AGX_FORCE_INLINE.

◆ isUnique()

bool agx::Object::isUnique ( ) const
inherited

Definition at line 375 of file Object.h.

◆ load() [1/7]

static Component* agx::Component::load ( const String &  path,
const Path &  _namespace = Path() 
)
staticinherited

◆ load() [2/7]

static Component* agx::Component::load ( const String &  path,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited

◆ load() [3/7]

static Component* agx::Component::load ( const Path &  path,
const Name &  implementation,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited

◆ load() [4/7]

static Component* agx::Component::load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited

◆ load() [5/7]

static Object* agx::Object::load ( const String &  path,
Device *  device,
const String &  type = "",
size_t  instance = 0 
)
staticinherited

◆ load() [6/7]

static Object* agx::Object::load ( const String &  path,
Device *  device,
const String &  type,
const String &  attribute,
const String &  value 
)
staticinherited

◆ load() [7/7]

static void agx::Object::load ( const String &  path,
Device *  device,
ObjectPtrVector &  loadedObjects 
)
staticinherited

◆ openDocument()

static TiXmlDocument agx::Object::openDocument ( const String &  path)
staticinherited

◆ printSubtree() [1/2]

virtual void agx::Component::printSubtree ( ) const
overridevirtualinherited

Reimplemented from agx::Object.

◆ printSubtree() [2/2]

void agx::Component::printSubtree ( std::ostream &  stream,
int  depth = 0 
) const
inherited

◆ rebind()

virtual void agx::Component::rebind ( )
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agx::Clock.

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ remove()

bool agxCollide::Space::remove ( Geometry *  geometry)

Remove a geometry from Space.

Parameters
geometry- Pointer to a Geometry that will be removed
Returns
true if geometry existed in space and was successfully removed

◆ removeAllObjects()

void agx::Component::removeAllObjects ( )
inherited

Remove all components.

◆ removeContact() [1/2]

Remove a specified GeometryContact from the list of contacts.

It is important that this iterator is valid, i.e. accessed during the same time step and that the list of contacts is not modified since it is acquired.

Parameters
contact- iterator taken from the getGeometryContacts() at the same time step.

◆ removeContact() [2/2]

void agxCollide::Space::removeContact ( agx::Physics::GeometryContactPtr  contact)

Schedule a removal of a specified Narrow phase contact, the contact will not be removed until the method commitRemovedContacts() is called (during the next update())

Parameters
contact- Remove the specified contact.

Definition at line 952 of file Space.h.

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

◆ removeListener() [1/2]

void agx::Object::removeListener ( EventListener *  listener)
inherited

◆ removeListener() [2/2]

bool agxCollide::Space::removeListener ( agxCollide::SpaceListener *  listener)

Remove a listener from Space.

Returns
true if removal was successful

◆ removeObject() [1/2]

virtual void agx::Component::removeObject ( agx::Object *  object)
virtualinherited

Remove an object from the component.

◆ removeObject() [2/2]

void agx::Component::removeObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited

Remove an object with a specified name (and optional index) from the component.

◆ removeOverlap()

void agxCollide::Space::removeOverlap ( agxCollide::Geometry *  geometry1,
agxCollide::Geometry *  geometry2 
)

Remove a (Sweep and Prune) bounding overlap, if it exists, between geometry1 and geoemtry2.

It doesn't matter in which order the two geometries are passed to this method.

Parameters
geometry1- first geometry
geometry2- second geometry

Definition at line 966 of file Space.h.

◆ reportOverlap()

void agxCollide::Space::reportOverlap ( agxCollide::Geometry *  geometry1,
agxCollide::Geometry *  geometry2 
)

Add an explicit bounding volume overlap between the two specified geometries.

Parameters
geometry1,geometry2- The two geometries in the new Broad phase overlap.

Definition at line 958 of file Space.h.

References agxCollide::Geometry::isEnabled().

◆ resetGeometryCellAssignments()

void agxCollide::Space::resetGeometryCellAssignments ( agxCollide::Geometry *  geometry)

◆ resetParticleCellAssignments()

void agxCollide::Space::resetParticleCellAssignments ( )

◆ save()

virtual void agx::Object::save ( TiXmlElement *  ) const
inlinevirtualinherited

Reimplemented in agx::Clock.

Definition at line 105 of file Object.h.

◆ setBroadPhaseAlgorithm()

bool agxCollide::Space::setBroadPhaseAlgorithm ( BroadPhaseAlgorithm  algorithm)

Specify a new broad phase algorithm implementation.

Returns
false if the algorithm can't be changed, eg if using ParallelPGS solver, or particle system, which both require the HIERARCHICAL_GRID

◆ setContactReductionBinResolution()

void agxCollide::Space::setContactReductionBinResolution ( agx::UInt  binResolution)

Specify the default (for this Simulation) resolution used when evaluating contacts for reduction between geometry-geometry contacts.

A high value will keep more contacts, lower will result in more aggressive reduction the default. If no resolution is specified per material this value will be used. Commonly a value of 2-3 will give good results. Values from 1 to 10 are valid. This value will be used for all geometry contacts where either no contact material is set, or where the ContactReductionBinResolution of the contact material is 0.

Parameters
binResolution- parameter to ContactReducer.

◆ setContactReductionThreshold()

void agxCollide::Space::setContactReductionThreshold ( agx::UInt  threshold)

Specify the lower threshold for the number of contact points needed per geometry contact in order to do contact reduction per geometry contact.

Parameters
threshold- Lower threshold for number of contact points in a geometry contact in order run contact reduction on it.

◆ setContext()

virtual void agx::Object::setContext ( agx::Object *  context)
virtualinherited

Reimplemented in agx::Task, and agxData::FunctionValue.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setDevice()

void agx::Component::setDevice ( Device *  device)
protectedinherited

◆ setEnableCollisions()

void agxCollide::Space::setEnableCollisions ( const Geometry *  g1,
const Geometry *  g2,
bool  flag 
)

Explicitly disable/enable a geometry pair.

◆ setEnableContactReduction()

void agxCollide::Space::setEnableContactReduction ( bool  flag)

Enable/Disable contact reduction between pairs of geometries.

Parameters
flag- if true, contact reduction is enabled.

◆ setEnableGeometry()

void agxCollide::Space::setEnableGeometry ( Geometry *  geometry,
bool  flag 
)

◆ setEnablePair() [1/2]

void agxCollide::Space::setEnablePair ( agx::UInt32  group1,
agx::UInt32  group2,
bool  flag 
)

Enable/disable collisions between two geometry group ID:s.

This can be used to group Geometries into separate collision groups, where collisions can be enabled/disabled between the different GeometryID groups.

The largest number for a group ID is defined to be 2^31 - 1 (2 147 483 647), the rest are reserved by space and can be accessed via getUniqueGroupID().

Parameters
group1- First group id
group2- Second group id
flag- If true, the geometries in groupID1 and groupID2 can collide, otherwise not.

◆ setEnablePair() [2/2]

void agxCollide::Space::setEnablePair ( const agx::Name &  group1,
const agx::Name &  group2,
bool  flag 
)

◆ setEnableRebind()

static void agx::Object::setEnableRebind ( bool  flag)
staticinherited

Sets if rebinding of objects should be allowed (Right now a global setting).

Allowing it when adding larger parts to the system tree might hit performance, so it might be smarter to disable it first, then add, and then enable again.

◆ setEnableSerialization()

void agxStream::Serializable::setEnableSerialization ( bool  flag)
inherited

Set to false to disable serialization of this object.

It will just be ignored during serialization (writing). It is still possible to restore TO this object.

◆ setEnableUuidGeneration()

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

◆ setFinished()

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

◆ setId()

void agx::Object::setId ( UInt32  id)
inherited

◆ setModel()

void agx::Object::setModel ( agx::Model *  model)
inherited

Set the object model (handled automatically).

◆ setName()

void agx::Object::setName ( const agx::Name &  name)
inherited

Set the name of the object.

◆ setOrientedBoundsThreshold()

void agxCollide::Space::setOrientedBoundsThreshold ( agx::Real  threshold)

Sets the threshold where oriented bounds are created for Geometries.

Changing the value will create or destroy oriented bounds as necessary for already created Geometries.

◆ setUuid()

void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

Explicitly set a Uuid on a serializable object.

Use this method with great care, as it can result in non-unique identifiers in the system!

◆ snapshot()

virtual void agx::Component::snapshot ( TiXmlNode *  eParent,
const String &  directory 
) const
overridevirtualinherited

Reimplemented from agx::Object.

◆ testBoundingVolumeOverlap()

bool agxCollide::Space::testBoundingVolumeOverlap ( GeometryPtrVector &  testGeometries,
GeometryPairVector &  geometryPairs,
ParticleGeometryPairVector &  particleGeometryPairs,
bool  skip = true 
)

Tests a number of geometries for bounding volume overlaps without changing the geometries already in space besides from updating bounding volumes.

Parameters
testGeometries- The vector with geometries that should be tested for overlaps. These may be rearranged to speed up testing.
geometryPairs- The geometry pairs which have overlapping bounding volumes
particleGeometryPairs- The particle-geometry pairs which have overlapping bounding volumes
skip- If true, skip collisions between geometries that both are in the testGeometries vector. Useful when some geometries are already added to space.
Returns
true if any overlaps were found.

◆ testGeometryOverlap()

bool agxCollide::Space::testGeometryOverlap ( GeometryPtrVector &  testGeometries,
LocalGeometryContactVector &  geometryContacts,
LocalParticleGeometryContactVector &  particleGeometryContacts,
bool  skip = true 
)

Test if a number of geometries collides with something already present in space without changing space, besides from updating some bounding volumes.

Parameters
testGeometriesThe vector with geometries that should be tested for overlaps. These may be rearranged to speed up testing.
geometryContacts- The geometry contacts that were found
particleGeometryContacts- The particle-geometry contacts that were found
skip- If true, skip collisions between geometries that both are in the testGeometries vector. Useful when some geometries are already added to space.
Returns
True if any overlaps were found.

◆ traverse() [1/2]

void agx::Component::traverse ( const TraverseCallback &  callback)
inherited

◆ traverse() [2/2]

void agx::Component::traverse ( ComponentVisitor *  )
inherited

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ update()

void agxCollide::Space::update ( )

Update the contact state of the entire space including Broad Phase and narrow phase.

◆ updateBroadPhase()

void agxCollide::Space::updateBroadPhase ( )

Update the broad-phase state of the space.

◆ updateNarrowPhase()

void agxCollide::Space::updateNarrowPhase ( )

Update the narrow phase state, calculating contact data for all overlapping geometry pairs.

i.e. check all current bounding box overlaps for possible contacts

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ addObjectEvent

ObjectEvent agx::Component::addObjectEvent
inherited

Definition at line 63 of file Component.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ removeObjectEvent

ObjectEvent agx::Component::removeObjectEvent
inherited

Definition at line 64 of file Component.h.


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