19 #include <agx/config/AGX_USE_WEBSOCKETS.h>
45 # pragma warning(push)
46 # pragma warning( disable : 4290 )
56 class ParticleEmitter;
57 class RigidBodyEmitter;
62 class StabilityReport;
70 class AngularLockJoint;
71 class CylindricalJoint;
73 class PrismaticUniversalJoint;
83 class RemoteDebugClient;
98 class SurfaceVelocityConveyorBelt;
109 class SimulationFrameReader;
110 class SimulationFrameWriter;
112 class SimulationFrameWriter;
113 class GuiEventAdapterImplementation;
115 class MergeSplitHandler;
116 class TerrainInstance;
353 bool add( agxControl::Action* action );
360 bool remove( agxControl::Action* action );
367 bool add( agxControl::Operation* operation );
374 bool remove( agxControl::Operation* operation );
643 template <
typename T >
654 template <
typename T >
655 const T* getConstraint(
const agx::Uuid& uuid)
const;
665 template <
typename T >
666 T* getConstraint(
const agx::Name& name );
676 template <
typename T >
677 const T* getConstraint(
const agx::Name& name )
const;
679 #define GETCONSTRAINT_TYPE(CLASS_NAME, TYPENAME) \
680 CLASS_NAME *get ## TYPENAME(const agx::Name& name); \
681 CLASS_NAME *get ##TYPENAME(const agx::Uuid& uuid);
693 #undef GETCONSTRAINT_TYPE
846 #if AGX_USE_WEBSOCKETS()
850 agx::RemoteSolver* getRemoteSolver();
855 const agx::RemoteSolver* getRemoteSolver()
const;
975 STEP_LISTENERS = 0x1,
976 CONTACT_LISTENERS = 0x2,
978 LISTENERS = STEP_LISTENERS | CONTACT_LISTENERS | GUI_LISTENERS,
983 PARTICLE_SYSTEMS = 0x2000,
984 CONTACT_DATA = 0x4000,
985 CLEANUP_ALL = LISTENERS | SYSTEM | SPACE | MATERIALS | ASSEMBLIES | PARTICLE_SYSTEMS | CONTACT_DATA
993 STEP_LISTENERS = EventManager::STEP_LISTENERS,
994 CONTACT_LISTENERS = EventManager::CONTACT_LISTENERS,
995 GUI_LISTENERS = EventManager::GUI_LISTENERS,
996 LISTENERS = EventManager::LISTENERS,
1000 ASSEMBLIES = 0x1000,
1001 PARTICLE_SYSTEMS = 0x2000,
1002 CONTACT_DATA = 0x4000,
1003 PLOTSYSTEM = 0x8000,
1004 CLEANUP_ALL = LISTENERS | SYSTEM | SPACE | MATERIALS | ASSEMBLIES | PARTICLE_SYSTEMS | CONTACT_DATA | PLOTSYSTEM
1014 READ_TIMESTEP = 0x1,
1015 READ_TIMESTAMP = 0x2,
1018 READ_ALL = READ_TIMESTEP + READ_TIMESTAMP + READ_GRAVITY + READ_SOLVER,
1019 READ_DEFAULT = READ_TIMESTEP + READ_GRAVITY + READ_SOLVER
1235 size_t write( std::ostream& stream,
bool binary )
const;
1480 const agx::SolveModelRefVector& getSolveModels()
const;
1482 #if AGX_USE_WEBSOCKETS()
1483 void setRemoteSolver(agx::RemoteSolver* remoteSolver);
1552 bool allowCreateParticles()
const;
1564 friend class GuiEventAdapterImplementation;
1582 void initConfiguration();
1585 void updateStatisticsEnable();
1587 void setEnableComputeAllConstraintForces(
bool flag);
1588 bool getEnableComputeAllConstraintForces()
const;
1591 void resetGraphStatistics();
1597 void setupStatisticsLogging();
1599 void updateConstraintForceData();
1601 void createUpdateTask();
1603 void generateContactMaterials();
1605 void prepareContacts();
1606 void triggerParticleContactSensors();
1607 void triggerPreStepEvents();
1608 void triggerPostStepEvents();
1609 void triggerLastStepEvents();
1610 void terrainPostUpdate();
1612 void resetDirtyMaterials();
1613 void updateRemoteDebugger();
1614 void recordStatistics();
1615 void recordPlaybackStatistics();
1616 void recordParticleCount();
1617 void recordWarmStartingData();
1618 void printStatistics();
1622 void pruneContacts();
1623 void contactPointReduction();
1624 void updateSleepState();
1625 void triggerPreCollideStepEvent();
1626 void triggerSeparationContactEventListeners();
1627 void triggerContactEventListeners();
1628 void assignContactMaterials();
1631 void applyPreIntegrationSettings();
1634 friend class agx::Solver;
1635 void registerParticleSystemPointers();
1636 void unregisterParticleSystemPointers();
1641 class StatisticsWriter;
1645 #if AGX_USE_WEBSOCKETS()
1646 friend class agx::RemoteSolver;
1650 void setHasJournal(
bool flag);
1651 void preStoreSynchronization();
1654 StatisticsWriter* m_statWriter;
1667 bool m_stepToStarted;
1669 EventManagerRef m_eventManager;
1672 agxControl::ActionManagerRef m_actionManager;
1692 bool m_preIntegrate;
1694 bool m_allowCreateParticles;
1702 agx::SolveModelTable m_solveModelTable;
1703 agx::SolveModelRefVector m_solveModels;
1712 void* m_remoteSolver;
1715 bool m_enableComputeAllConstraintForces;
1716 bool m_inDestructor;
1747 bool m_disableGeometryAutoAdd;
1765 return m_space.
get();
1770 return m_space.
get();
1775 return m_system.
get();
1780 return m_system.
get();
1785 if (m_system)
return m_system->getTimeGovernor()->getTimeStep();
1801 return m_allowCreateParticles;
1806 return m_solveModels;
1809 template<
typename T >
1815 template<
typename T >
1818 return dynamic_cast< const T*
>( this->
getConstraint( uuid ) );
1821 template<
typename T >
1827 template<
typename T >
1830 return dynamic_cast< const T*
>( this->
getConstraint( name ) );
1835 # pragma warning(pop)
#define AGX_DECLARE_POINTER_TYPES(type)
#define GETCONSTRAINT_TYPE(CLASS_NAME, TYPENAME)
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Data storage for a collection of entity instances of a specified EntityModel.
Class for receiving serialized agxSDK::Simulation:s from remote host.
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Keeps track of the energy flow in the system.
An EventListener can be associated to a Simulation and triggered upon various events.
Class for storing an Event which will be executed later inside Simulation.
Simulation unique manager that handles logics around and parameters in contact materials given two ag...
Base class for a merge split algorithm handling a set of merged bodies.
Interface class used by internal objects running in parallel.
class for serializing a simulation into a series for files on disk <filename>_0001....
This class will collect statistics and sizes of a simulation.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
void readStoragePermutations(agxStream::InputArchive &in, bool clearStorages=false)
MaterialEvent addMaterialEvent
bool add(agx::RigidBody *body, bool addGeometries=true)
agx::Material * getMaterial(const agx::Name &materialName)
bool addEventListener(agxSDK::EventListener *listener, int priority=EventManager::DEFAULT_PRIORITY)
Add an event listener The listener will get a call to its addNotification method if adding was succes...
bool remove(agx::MergedBody *mergedBody)
Removes the merged body from this simulation.
void loadSolveModels(const agx::String &path, bool clear=false)
agxSDK::MergeSplitHandler * getMergeSplitHandler() const
Merge split handler is an object that enables performance boosts by merging rigid bodies together whi...
agx::Constraint1DOF * getConstraint1DOF(const agx::Name &name)
bool getEnableStatistics() const
agx::RigidBody * getRigidBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a RigidBody with the given uuid.
agxCollide::Geometry * getGeometry(const agx::Name &name)
Find (linear search) and return named collision Geometry.
agxSDK::SimulationParameter * getParameter(const agx::Name &name)
bool add(agx::ParticleContactSensor *sensor)
Add a particle contact sensor to the Simulation.
const agx::Emitter * getEmitter(const agx::Uuid &uuid) const
Find (linear search) and return an emitter matching the given uuid.
agxCollide::Geometry * getGeometry(const agx::Uuid &uuid)
Find (linear search) and return a geometry matching the given uuid.
const SimulationSerializer * getSerializer() const
bool contains(const agx::Component *object) const
Is the object contained in the simulation?
const MaterialManager * getMaterialManager() const
agx::Event2< Simulation *, agxCollide::Geometry * > GeometryEvent
void setEnableSimulationStatisticsListener(bool flag)
Enable/disable the listener that collects all statistics data from the simulation.
const agx::RigidBody * getRigidBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a RigidBody with the given uuid.
agx::SolveModel * getSolveModel(const agx::Name &name)
agx::ObserverFrameRefSetVector & getObserverFrames()
bool remove(agxStream::Serializable *object)
Remove an object as a serializable object.
bool remove(agx::ContactMaterial *material)
Remove an explicit contact material from the set of existing ContactMaterials.
void setStatisticsPath(const agx::String &path)
Specify the path to a file where the statistics information will be written when enabled.
const agxSDK::EventListener * getEventListener(const agx::Uuid &uuid) const
Find (linear search) and return the first event listener matching the uuid.
SimulationSerializer * getSerializer()
bool setTimeStep(agx::Real timeStep)
Sets the time step determined by the TimeGovernor in the DynamicsSystem.
MaterialManager * getMaterialManager()
const agx::MergeSplit * getMergeSplit() const
bool add(agx::Material *material)
Add a material to the simulation.
agx::Material * getMaterial(const agx::Uuid &uuid)
const agx::RigidBodyPtrSetVector & getEnabledRigidBodies() const
void setPickHandler(agxSDK::PickHandler *pickHandler)
Assign interface for pick handler.
agxSDK::PickHandler * getPickHandler()
bool remove(agx::Interaction *interaction)
Remove an Interaction from the Simulation.
const agxSDK::Assembly * getAssembly(const agx::Uuid &uuid) const
Find (linear search) and return an Assembly matching the given uuid.
void updateActionManager()
Internal method.
const agx::MergedBody * getMergedBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a MergedBody with the given uuid.
const agx::Solver * getSolver() const
agx::UInt getContactReductionThreshold() const
agx::Component * getHeader()
bool removeRestoreListener(agxStream::RestoreListener *listener)
Remove an existing listener in a simulation.
const agxCollide::GeometryRefVector & getGeometries() const
void setEnableStatisticsRendering(bool enable)
void sendSimulation()
Send the simulation to the remote debugger (if enabled)
bool remove(agxSDK::EventListener *listener)
Remove a Event listener.
agxPlot::System * getPlotSystem() const
const agxCollide::Geometry * getGeometry(const agx::Name &name) const
Find (linear search) and return named collision Geometry.
bool remove(agx::Component *subComponent)
Remove a sub component from Simulation.
void setContactReductionBinResolution(agx::UInt8 binResolution)
Specify the bin resolution used when evaluating contacts for reduction between body-body contacts.
agx::Emitter * getEmitter(const agx::Name &name)
Find (linear search) and return an emitter matching the given name.
RigidBodyEvent addRigidBodyEvent
agx::Event2< Simulation *, agx::Constraint * > ConstraintEvent
bool add(agxControl::Operation *operation)
Register an operation to this simulation.
agxRender::RenderManager * getRenderManager()
void getEventListeners(EventListenerPtrVector &eventListeners) const
Get a vector containing all the registered event listeners.
agx::ParticleEmitterRefVector getParticleEmitters()
void clearContactData()
Clears contact data in the simulation.
bool getUseComplexImpactStage() const
void addSolveModel(agx::SolveModel *model)
agxSDK::Assembly * getAssembly(const agx::Uuid &uuid)
Find (linear search) and return an Assembly matching the given uuid.
bool removeEventListener(agxSDK::EventListener *listener)
Remove the specified listener.
agx::ConstraintRefSetVector & getConstraints()
const agx::ObserverFrame * getObserverFrame(const agx::Name &name) const
Find (linear search) the first ObserverFrame object in the system that matches the name.
const agx::Journal * getJournal() const
bool add(agx::Constraint *constraint)
Add a constraint to the simulation.
const SimulationStatisticsListener * getSimulationStatisticsListener() const
bool add(agxSDK::TerrainInstance *terrain)
Add terrain (agxTerrain::Terrain) instance to this simulation.
JournalAttachEvent journalAttachedEvent
bool add(agx::ContactMaterial *material)
Add an explicit contact material to the simulation.
agx::Constraint * getConstraint(const agx::Uuid &uuid)
Find and return a pointer to a Constraint with the given uuid.
void stepForward()
Take one step forward in the simulation.
agx::Constraint * getConstraint(const agx::Name &name)
Find (linear search) and return named Constraint.
bool restore(const agx::String &filename, agx::UInt selection=READ_DEFAULT)
Restore state from a serialized scene file.
bool add(agxSDK::EventListener *listener, int priority=EventManager::DEFAULT_PRIORITY)
Add an event listener The listener will get a call to its addNotification method if adding was succes...
size_t write(std::ostream &stream, bool binary) const
Serialize the simulation to the specified file.
bool add(agxSDK::SimulationParameter *parameter)
Add a parameter to the simulation configuration interface.
const agx::Material * getMaterial(const agx::Name &materialName) const
const agx::SolveModelRefVector & getSolveModels() const
agxSDK::Assembly * getAssembly(const agx::Name &name)
Find (linear search) and return named Assembly.
void commit(agxSDK::SimulationProxy *simulationProxy)
Internal method.
ReadSelectionMask
Enum for specifying some additional, part of a simulation that can be restored from a serialization.
agx::MergedBody * getMergedBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a MergedBody with the given uuid.
bool add(agx::ParticleSystem *particleSystem)
Add a particle system to the simulation.
agx::ParticleSystem * getParticleSystem() const
bool remove(agx::RigidBody *body, bool removeGeometries=true)
Remove a body from the Simulation, the body will be disabled!
void store(agxStream::OutputArchive &archive) const
Save this simulation to the output archive.
bool remove(agxSDK::TerrainInstance *terrain)
Remove terrain (agxTerrain::Terrain) instance from this simulation.
const agxWire::Wire * getWire(const agx::Uuid &uuid) const
Find (linear search) and return the first wire matching the uuid.
Simulation()
Default constructor This constructor CAN Throw a std::runtime_exception if configuration file is brok...
size_t read(const agx::String &filename, agxSDK::Assembly *parent=nullptr, agx::UInt selection=READ_DEFAULT)
Read serialized simulation from the specified file and append to this simulation.
void setTimeStamp(agx::TimeStamp t)
Set the timestamp for the simulation (and the DynamicsSystem)
void setEnableRemoteDebugging(bool flag, agx::Int16 port=-1, bool useCompression=false, bool waitForSynchronization=true)
Enable/Disable remote debugging.
const agxWire::Wire * getWire(const agx::Name &name) const
Find and return the first matching named wire.
void setStatisticsInterval(agx::Real interval)
agx::Event2< Simulation *, agx::Journal * > JournalAttachEvent
agx::EmitterRefVector getEmitters()
agx::MergeSplit * getMergeSplit()
agx::UInt getNumTerrains() const
agx::Real getTimeStep() const
agx::Real getProfilingFrequency() const
agxSDK::EventListener * getEventListener(const agx::Uuid &uuid)
Find (linear search) and return the first event listener matching the uuid.
agx::Real getRemoteDebuggingTimeStep() const
agx::RigidBody * getRigidBody(const agx::Name &name)
Find (linear search) and return named RigidBody.
bool remove(agxSDK::SimulationParameter *parameter)
Remove a parameter from the simulation configuration interface.
agx::TaskGroup * getUpdateTask()
RigidBodyEvent removeRigidBodyEvent
void setPlotSystem(agxPlot::System *plotSystem)
Replace the current PlotSystem with plotSystem.
bool remove(agx::ObserverFrame *observerFrame)
Remove a ObserverFrame to the Simulation.
bool remove(agx::ParticleSystem *particleSystem)
Remove a particle system from the simulation.
void setActionManagerTimeStamp(const agx::TimeStamp &time)
Truncating an AGX simulation does not reset the timestamp in the action manager.
agx::GravityField * getGravityField()
bool add(agxCollide::Geometry *geometry)
bool restore(std::istream &stream, bool isBinary, agx::UInt selection=READ_DEFAULT)
void setGravityField(agx::GravityField *gravityField)
Set the GravityField model used in gravity calculations.
agxPlot::DataSeries * getTimeDataSeries() const
A data series that contains all time stamps of the simulation.
agx::Event2< Simulation *, agx::Material * > MaterialEvent
void restore(agxStream::InputArchive &in, agxSDK::Assembly *parent=nullptr, agx::UInt selection=READ_DEFAULT, bool replaceUsingCache=false)
Read data from the input archive and add to the simulation.
void resetTaskTimers()
Reset profiling timers.
GeometryEvent addGeometryEvent
bool setUniformGravity(const agx::Vec3 &g)
Set the uniform gravity.
bool getEnableRemoteDebugging() const
size_t read(std::istream &stream, bool isBinary, agxSDK::Assembly *parent=nullptr, agx::UInt selection=READ_DEFAULT)
Read serialized simulation from the specified stream.
void setUseComplexImpactStage(bool flag)
agx::ObserverFrame * getObserver(const agx::Name &name)
Find (linear search) and return named ObserverFrame.
void dumpMemoryUsage(const agx::String &filePath="TaskTimers.xml")
Print current agxData buffer allocations to a file.
const agx::RigidBody * getRigidBody(const agx::Name &name) const
Find (linear search) and return named RigidBody.
const agxSDK::EventListener * getEventListener(const agx::Name &name) const
Find and return the first matching named event listener.
agxData::EntityStorage * getEmitterStorage()
bool remove(agxControl::Action *action)
Remove an action from this simulation.
agx::Event2< Simulation *, agx::RigidBody * > RigidBodyEvent
const agxSDK::Assembly * getAssembly(const agx::Name &name) const
Find (linear search) and return named Assembly.
virtual ~Simulation()
Destructor.
void setSpace(agxCollide::Space *space)
Replace the current Collision space with space.
void removeSolveModel(agx::SolveModel *model)
CleanupSelectionMask
Specification of what should be cleaned up from a simulation during a call to the cleanup() method.
bool remove(agx::ParticleContactSensor *sensor)
Remove a particle contact sensor from the system.
void writeStatisticsFiles(const agx::String &directoryPath="Statistics", bool taskProfile=true, bool threadTimeline=true, const agx::Vector< agx::String > &timelineFormats=agx::Vector< agx::String >(), bool bufferAllocations=true)
void cleanup(agx::UInt selection=CLEANUP_ALL, bool fast=false)
This method will remove/cleanup selected parts of the simulation.
SimulationStatisticsListener * getSimulationStatisticsListener()
ConstraintEvent removeConstraintEvent
bool add(agx::MergedBody *mergedBody)
Add a merged body to this simulation.
agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid)
Find and return a pointer to a ObserverFrame with the given uuid.
const agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
agx::ObserverFrame * getObserverFrame(const agx::Name &name)
Find (linear search) the first ObserverFrame object in the system that matches the name.
agx::MergedBody * getMergedBody(agx::UInt i) const
void setPreIntegratePositions(bool flag)
Set true to integrate positions at the start of the timestep rather than at the end.
bool remove(agxCollide::Geometry *geometry)
Remove geometry from collision space.
bool allowCreateParticles() const
agx::Vec3 getUniformGravity() const
If the current gravity field is not a uniform one (for example PointGravityField),...
void handleStabiltyReport(const agx::StabilityReport *stabilityReport)
Internal method.
static Simulation * load(agx::TiXmlElement *eSimulation, agx::Device *device)
void setDynamicsSystem(agx::DynamicsSystem *system)
Replace the current DynamicsSystem with system.
const agx::ObserverFrameRefSetVector & getObserverFrames() const
agx::Real getTimeStamp() const
const agxRender::RenderManager * getRenderManager() const
agx::RigidBodyRefVector & getRigidBodies()
const agx::Constraint * getConstraint(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a Constraint with the given uuid.
bool add(agxControl::Action *action)
Register an action to this simulation.
const agxSDK::SimulationParameterRefVector & getParameters() const
void dumpTaskTimers(const agx::String &filePath="BufferAllocations.xml")
Print current task performance timers to a file.
agxControl::ActionManager * getActionManager()
Gets the action manager.
void setMainWorkThread(agx::Thread *thread)
Specify which is the main working thread for the Simulation.
const agx::ConstraintRefSetVector & getConstraints() const
const agx::ParticleSystemRefVector & getParticleSystems() const
bool add(agx::ObserverFrame *observerFrame)
Add a ObserverFrame to the Simulation.
agx::ObserverFrame * getObserver(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
bool triggerEvent(const GuiEvent &e)
Execute a GuiEvent.
bool getEnableStatisticsRendering() const
void updateStatisticsRenderData()
Make an explicit call to RenderManager::update() to update the statistics rendering information.
void garbageCollect()
Use with caution!
bool add(agx::Component *subComponent)
Add a sub component to the Simulation.
size_t write(const agx::String &filename) const
Serialize the simulation to the specified file.
agx::DynamicsSystem * getDynamicsSystem()
agxSDK::EnergyManager * getEnergyManager() const
return the energy manager of the system.
bool remove(agx::Emitter *emitter, bool removeGeometries=true)
Remove an emitter from the system.
Simulation(agx::Device *device)
Special constructor which will associate the Simulation to a specified device.
ContactMaterialEvent removeContactMaterialEvent
void setEnableStatistics(bool enable)
Enable/disable statistics logging to disk.
bool remove(agx::Constraint *constraint)
Remove a constraint from the simulation.
bool remove(agxSDK::Assembly *assembly, bool removeAllEntries=true)
Remove an assembly from the simulation.
bool remove(agxControl::Operation *operation)
Remove an operation from this simulation.
agx::Emitter * getEmitter(const agx::Name &name) const
Find (linear search) and return an emitter matching the given name.
agxCollide::Space * getSpace()
agx::Journal * getJournal()
agxSDK::TerrainInstance * getTerrain(agx::UInt i) const
const agx::ObserverFrame * getObserver(const agx::Name &name) const
Find (linear search) and return named ObserverFrame.
agx::RigidBodyPtrSetVector & getEnabledRigidBodies()
bool breakStepTo()
Break an initiated stepTo() after the current simulation step.
void setRemoteDebuggingTimeStep(agx::Real timeStep)
Sets the time step for remote debugging.
GeometryEvent removeGeometryEvent
agxSDK::EventListener * getEventListener(const agx::Name &name)
Find and return the first matching named event listener.
bool add(agx::Interaction *interaction)
Add an Interaction to the Simulation.
void updateRenderManager()
Make an explicit call to RenderManager::update() to update the debug rendering information.
agx::ParticleSystemRefVector & getParticleSystems()
bool addRestoreListener(agxStream::RestoreListener *listener)
Add a restore listener to the Simulation.
ConstraintEvent addConstraintEvent
void setContactReductionThreshold(agx::UInt threshold)
Specify the minimum number of contacts between two bodies required to execute contact reduction.
void setProfilingFrequency(agx::Real frequency)
Specify the frequency for performance profiling.
ContactMaterialEvent addContactMaterialEvent
static agx::Model * ClassModel()
Internal method.
void writeStoragePermutations(agxStream::OutputArchive &archive) const
bool getPreIntegratePositions() const
agx::TimeStamp stepTo(agx::TimeStamp t)
Step the simulation forward 1 or more time steps in time until we get to the time t.
agx::UInt getNumMergedBodies() const
const agx::GravityField * getGravityField() const
agx::Constraint2DOF * getConstraint2DOF(const agx::Name &name)
agxWire::Wire * getWire(const agx::Name &name)
Find and return the first matching named wire.
MaterialEvent removeMaterialEvent
agx::Emitter * getEmitter(const agx::Uuid &uuid)
Find (linear search) and return an emitter matching the given uuid.
bool remove(agx::Material *material)
Remove a specified material from the simulation.
agxWire::Wire * getWire(const agx::Uuid &uuid)
Find (linear search) and return the first wire matching the uuid.
const agxSDK::PickHandler * getPickHandler() const
bool add(agx::Emitter *emitter, bool addGeometries=true)
Add an emitter to the Simulation.
bool add(agxStream::Serializable *object)
Add an object as a serializable object.
agx::UInt8 getContactReductionBinResolution() const
agx::Solver * getSolver()
agx::MergedBody * getMergedBody(const agx::Name &name)
Find (linear search) and return named MergedBody.
const agx::RigidBodyRefVector & getRigidBodies() const
const AssemblyHash & getAssemblies() const
const agx::ObserverFrame * getObserver(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
const agxCollide::Geometry * getGeometry(const agx::Uuid &uuid) const
Find (linear search) and return a geometry matching the given uuid.
const agx::Constraint * getConstraint(const agx::Name &name) const
Find (linear search) and return named Constraint.
const agx::MergedBody * getMergedBody(const agx::Name &name) const
Find (linear search) and return named MergedBody.
static agxSDK::SimulationProxyRef createDefaultProxy(agxSDK::Simulation *simulation)
Creates new simulation proxy of default type.
bool add(agxSDK::Assembly *assembly, bool addAllEntries=true)
Add an assembly to the simulation including all its parts.
agx::Event2< Simulation *, agx::ContactMaterial * > ContactMaterialEvent
agxSDK::SimulationProxy * getSimulationProxy() const
Internal method.
void setSerializer(SimulationSerializer *serializer)
Replace the current SimulationSerializer with a new instance.
agxTerrain::Terrain instance in a simulation, receiving step and contact callbacks in a controllable ...
Class for writing serialized data in binary format to a stream.
Class for listening to the restore of Serializable objects.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Interface and placeholder of controllers/helpers for wires.
Constraint that removes 3 DOF (rotational degrees of freedom) between two bodies, or one body and the...
Constraint that removes the three translation DOF between two bodies (or one and the world).
Clock class keeps representation of virtual/simulated time.
agx::Real getTime() const
A component is an object containing other objects, enabling hierarchical structuring.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
The base class for a constraint.
A cylindrical joint is similar to a prismatic joint but with an extra degree of freedom free (rotatio...
An agx::Device is an abstract representation of a device on which data can be stored and processed.
This joint will preserve the initial distance between a body and a point in world coordinate or betwe...
The complete physical system with bodies, interactions, data layout, time stepper,...
Spawns new bodys inside a given volume.
The class GravityField is responsible for calculating and applying a gravity force on a set of bodies...
The hinge constraint between two rigid bodies or one rigid body and the world.
The base class for interactions.
Inheritance with partial specialization due to bug with ref_ptr containers.
Constraint that removes all 6 DOF between two bodies, or one body and the world.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Class which will go through contacting/separating bodies and determine if the bodies can be merged (g...
Structure holding several "normal" rigid bodies.
A model is an abstract representation of the class of an agx::Object.
Representation of a name string.
With this class you can attach an ObserverFrame object relative to a RigidBody.
This class is for detecting and handling particle collisions with geometries in the simulation.
A basic particle system that contains all the storages and buffers required for basic operation and a...
A Prismatic Universal Joint has two translational dof's constrained.
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
The rigid body class, combining a geometric model and a frame of reference.
A representation of a generic task.
agx::Thread is a representation of an OS specific implementation of a computational thread.
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
A Universal Joint has one fixed relative point, the 3 translational dof's, and one constrained axis (...
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
A class holding 4 dimensional vectors and providing basic arithmetic.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::HashTable< agxCollide::Geometry *, agx::ref_ptr< Geometry > > GeometryTable
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Containins classes for sending/reading data over sockets as well as compression functionality.
Namespace contains functionality related to plotting.
Namespace containing classes for handling debug rendering of collision geometries,...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
agx::HashVector< agxSDK::Assembly *, agxSDK::AssemblyRef > AssemblyHash
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
AGXTERRAIN_EXPORT void clear()
Implements a Wire model with adaptive resolution.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
void AGXPHYSICS_EXPORT init()
Initialize agx.
agx::ref_ptr< Frame > FrameRef