358 agx::Solver* getSolver();
363 const
agx::Solver* getSolver() const;
385 void disableSolverDataExtraction();
390 bool getEnableSolverDataExtraction() const;
396 agxData::EntityStorage* getRigidBodyStorage();
399 void _setGravityTask(
agx::
Task* task );
433 void setEnableContactWarmstarting(
bool enable );
438 bool getEnableContactWarmstarting() const;
456 void createUpdateTask();
458 void setSimulation(
agxSDK::Simulation* simulation);
464 Task* createIntegratePositionsTask();
465 Task* createUpdateFramesTask();
466 Task* createSynchronizeGeometriesTask();
467 Task* createMergedBodyPostIntegrateTask();
469 virtual
void setContext(
Object* context) override;
470 void updateGravity();
472 void commitRemovedBodies();
482 void mergeSplitPre();
484 void mergeSplitPost();
485 void updateInteractionForces();
486 void updateSleepState();
488 void startUpdateTimer(
agx::
Task* task);
489 void stopUpdateTimerAndReport(
agx::
Task* task);
490 void recordPlaybackStatistics();
493 TaskRef m_updateWorldMassAndInertiaTask;
494 TaskRef m_integratePositionsTask;
515 int m_garbageCollectionCounter;
521 agxSDK::Simulation* m_simulation;
523 agx::
Task::ExecutionEvent::CallbackType m_startUpdateTimerCallback;
524 agx::
Task::ExecutionEvent::CallbackType m_stopUpdateTimerAndReportCallback;
540 return m_enabledBodies;
545 return m_enabledBodies;
550 return m_sleepingBodies;
554 return m_sleepingBodies;
559 m_geometryContacts = contacts;
564 return m_geometryContacts;
#define AGXPHYSICS_EXPORT
Class that will investigate bodies to see if they are resting, that is if linear/angular velocity and...
A component is an object containing other objects, enabling hierarchical structuring.
The base class for a constraint.
An agx::Device is an abstract representation of a device on which data can be stored and processed.
The complete physical system with bodies, interactions, data layout, time stepper,...
void setGeometryContacts(const agxCollide::GeometryContactPtrVector *contacts)
Set the geometry contacts to resolve.
static agx::Model * ClassModel()
void stepForward()
Step the Dynamics system forward using dt calculated from the current TimeGovernor.
const agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
ObserverFrame * getObserverFrame(const Name &name)
Find (linear search) the first ObserverFrame object in the system that matches the name.
agx::RigidBody * getRigidBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a RigidBody with the given uuid.
const agxCollide::GeometryContactPtrVector * getGeometryContacts() const
Get the geometry contacts to be resolved.
agx::RigidBodyPtrSetVector & getEnabledRigidBodies()
agx::Vec3 getAngularMomentum() const
Return the total angular momentum in the system.
const agx::Constraint * getConstraint(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a Constraint with the given uuid.
agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid)
Find and return a pointer to a ObserverFrame with the given uuid.
agx::Constraint * getConstraint(const agx::Uuid &uuid)
Find and return a pointer to a Constraint with the given uuid.
agx::Vec3 getLinearMomentum() const
Return the total linear momentum in the system.
bool remove(agx::Interaction *interaction)
Remove the specified Interaction from the system.
agx::MergeSplit * getMergeSplit()
RigidBody * getRigidBody(const Name &name)
Find (linear search) the first Physical in the system that matches the name.
agx::TimeGovernor * getTimeGovernor()
const RigidBody * getRigidBody(const Name &name) const
Find (linear search) the first Physical in the system that matches the name.
bool add(agx::Interaction *interaction)
Add an Interaction to the system.
const ObserverFrame * getObserverFrame(const Name &name) const
Find (linear search) the first ObserverFrame object in the system that matches the name.
const agx::TimeGovernor * getTimeGovernor() const
bool add(agx::ObserverFrame *observerFrame)
Add a ObserverFrame to the system.
bool add(agx::Constraint *constraint)
Add a constraint from the simulation.
agx::Solver * getSolver()
const agx::RigidBody * getRigidBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a RigidBody with the given uuid.
bool remove(agx::Constraint *constraint)
Remove a constraint from the simulation.
const agx::MergeSplit * getMergeSplit() const
bool remove(agx::RigidBody *rigidBody)
Schedule a RigidBody for removal.
const Constraint * getConstraint(const Name &name) const
Find (linear search) the first Constraint object in the system that matches the name.
bool remove(agx::ObserverFrame *observerFrame)
Schedule a ObserverFrame for removal.
void setTimeGovernor(agx::TimeGovernor *tg)
Replace the current iTimeGovernor with the specified one.
DynamicsSystem(agx::Device *device)
Create a DynamicsSystem with a specific device.
bool add(agx::RigidBody *rigidBody)
Add a RigidBody to the system.
agx::RigidBodyPtrSetVector & getSleepingRigidBodies()
Constraint * getConstraint(const Name &name)
Find (linear search) the first Constraint object in the system that matches the name.
DynamicsSystem()
Default constructor.
Utility entrance to the task system, simplifying parallelization of algorithms.
The base class for interactions.
Class which will go through contacting/separating bodies and determine if the bodies can be merged (g...
A model is an abstract representation of the class of an agx::Object.
Representation of a name string.
agx::Object is a refcounted object with a name.
With this class you can attach an ObserverFrame object relative to a RigidBody.
The rigid body class, combining a geometric model and a frame of reference.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
A representation of a generic task.
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
#define AGX_DEPRECATED(since)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::Vector< agx::Physics::GeometryPairPtr, agxData::BufferProxyAllocator > SeparationPairVector
agx::VectorPOD< GeometryContact * > GeometryContactPtrVector
Contains classes for low level data storage for AGX.
agx::ref_ptr< EntityStorage > EntityStorageRef
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::SetVector< InteractionRef > StrongInteractionRefSetVector
agx::SetVector< ref_ptr< Constraint > > ConstraintRefSetVector
agx::SetVector< InteractionRef > InteractionRefSetVector
agx::SetVector< RigidBody * > RigidBodyPtrSetVector
void AGXPHYSICS_EXPORT init()
Initialize agx.