301 agx::Solver* getSolver();
306 const agx::Solver* getSolver()
const;
339 agxData::EntityStorage* getRigidBodyStorage();
342 void _setGravityTask(
agx::
Task* task );
373 void setEnableContactWarmstarting(
bool enable );
378 bool getEnableContactWarmstarting() const;
396 void createUpdateTask();
398 void setSimulation(
agxSDK::Simulation* simulation);
404 Task* createIntegratePositionsTask();
405 Task* createUpdateFramesTask();
406 Task* createSynchronizeGeometriesTask();
407 Task* createMergedBodyPostIntegrateTask();
408 Task* createPostIntegrateCallbacksTask();
410 virtual
void setContext(
Object* context) override;
411 void updateGravity();
413 void commitRemovedBodies();
418 void updateInteractionForces();
420 void startUpdateTimer(
agx::
Task* task);
421 void stopUpdateTimerAndReport(
agx::
Task* task);
422 void recordPlaybackStatistics();
424 agxData::EntityStorageRef m_rigidBodyStorage;
425 TaskRef m_updateWorldMassAndInertiaTask;
426 TaskRef m_integratePositionsTask;
443 const
agxCollide::GeometryContactPtrVector* m_geometryContacts;
445 int m_garbageCollectionCounter;
448 agxSDK::Simulation* m_simulation;
450 agx::
Task::ExecutionEvent::CallbackType m_startUpdateTimerCallback;
451 agx::
Task::ExecutionEvent::CallbackType m_stopUpdateTimerAndReportCallback;
467 return m_enabledBodies;
472 return m_enabledBodies;
477 m_geometryContacts = contacts;
482 return m_geometryContacts;
485 inline Solver* DynamicsSystem::getSolver() {
return m_solver; }
486 inline const Solver* DynamicsSystem::getSolver()
const {
return m_solver; }
#define AGXPHYSICS_EXPORT
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,...
agx::ConstraintRefSetVector & getConstraints()
agx::RigidBodyRefVector & getRigidBodies()
const agx::StrongInteractionRefSetVector & getStrongInteractions() const
const agx::InteractionRefSetVector & getInteractions() const
void stepForward()
Step the Dynamics system forward using dt calculated from the current TimeGovernor.
const agx::RigidBodyRefVector & getRigidBodies() const
ObserverFrameRefSetVector & getObserverFrames()
const agx::RigidBody * getRigidBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a RigidBody with the given uuid.
static agx::Model * ClassModel()
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
agx::Constraint * getConstraint(const agx::Uuid &uuid)
Find and return a pointer to a Constraint with the given uuid.
agx::TimeGovernor * getTimeGovernor()
agx::Vec3 getAngularMomentum() const
Return the total angular momentum in the system.
RigidBody * getRigidBody(const Name &name)
Find (linear search) the first Physical in the system that matches the name.
Constraint * getConstraint(const Name &name)
Find (linear search) the first Constraint object in the system that matches the name.
const agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame 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.
const ObserverFrameRefSetVector & getObserverFrames() const
agx::RigidBody * getRigidBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a RigidBody with the given uuid.
void disableSolverDataExtraction()
Disable solver data extraction.
bool add(agx::Interaction *interaction)
Add an Interaction to the system.
void enableSolverDataExtraction(const agx::String &filename, const agx::String &solverDataGroup)
Enable solver data extraction.
const RigidBody * getRigidBody(const Name &name) const
Find (linear search) the first Physical in the system that matches the name.
bool add(agx::ObserverFrame *observerFrame)
Add a ObserverFrame to the system.
bool add(agx::Constraint *constraint)
Add a constraint from the simulation.
agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid)
Find and return a pointer to a ObserverFrame with the given uuid.
bool getEnableSolverDataExtraction() const
ObserverFrame * getObserverFrame(const Name &name)
Find (linear search) the first ObserverFrame object in the system that matches the name.
bool remove(agx::Constraint *constraint)
Remove a constraint from the simulation.
bool remove(agx::RigidBody *rigidBody)
Schedule a RigidBody for removal.
bool remove(agx::ObserverFrame *observerFrame)
Schedule a ObserverFrame for removal.
void setTimeGovernor(agx::TimeGovernor *tg)
Replace the current iTimeGovernor with the specified one.
const Constraint * getConstraint(const Name &name) const
Find (linear search) the first Constraint object in the system that matches the name.
DynamicsSystem(agx::Device *device)
Create a DynamicsSystem with a specific device.
bool add(agx::RigidBody *rigidBody)
Add a RigidBody to 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.
DynamicsSystem()
Default constructor.
const agx::ConstraintRefSetVector & getConstraints() const
Utility entrance to the task system, simplifying parallelization of algorithms.
The base class for interactions.
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 DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contains classes for low level data storage for AGX.
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