AGX Dynamics  2.35.0.1
Simulation.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agx/config/AGX_USE_WEBSOCKETS.h>
20 #include <agxSDK/agxSDK.h>
21 #include <agxSDK/SimulationProxy.h>
23 #include <agxSDK/EventManager.h>
24 #include <agxSDK/MaterialManager.h>
25 #include <agxSDK/Assembly.h>
28 
29 #include <agx/DynamicsSystem.h>
30 #include <agx/TimeStamp.h>
31 #include <agx/HashTable.h>
32 #include <agx/Component.h>
33 #include <agx/GravityField.h>
34 #include <agx/Clock.h>
36 #include <agxData/Frame.h>
37 
39 
40 #include <agxCollide/Space.h>
41 
43 
44 #ifdef _MSC_VER
45 # pragma warning(push)
46 # pragma warning( disable : 4290 ) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
47 #endif
48 
49 namespace agx
50 {
51  class Interaction;
52  class ParticleSystem;
53  class RigidBody;
54  class MergeSplit;
55  class MergedBody;
56  class ParticleEmitter;
57  class RigidBodyEmitter;
58  class Journal;
59  class RemoteSolver;
60  class Solver;
61  class ObserverFrame;
62  class StabilityReport;
63 
64  class Hinge;
65  class Prismatic;
66  class DistanceJoint;
67  class LockJoint;
68  class BallJoint;
69  class PlaneJoint;
70  class AngularLockJoint;
71  class CylindricalJoint;
72  class UniversalJoint;
73  class PrismaticUniversalJoint;
74 }
75 
76 namespace agxCollide
77 {
78  class Geometry;
79 }
80 
81 namespace agxNet
82 {
83  class RemoteDebugClient;
84 }
85 
86 namespace agxRender
87 {
88  class RenderManager;
89 }
90 
91 namespace agxWire
92 {
93  class Wire;
94 }
95 
96 namespace agxModel
97 {
98  class SurfaceVelocityConveyorBelt;
99 }
100 
101 namespace agxPlot
102 {
103  class System;
104  class DataSeries;
105 }
106 
107 namespace agxSDK
108 {
109  class SimulationFrameReader;
110  class SimulationFrameWriter;
111  class EventListener;
112  class SimulationFrameWriter;
113  class GuiEventAdapterImplementation;
114  class PickHandler;
115  class MergeSplitHandler;
116  class TerrainInstance;
117  class EnergyManager;
118 
120 
127  {
128  public:
135 
138 
141 
144 
147 
150 
152 
153  public:
159 
160  public:
166 
172  bool add( agx::Material* material );
173 
178  bool add( agx::ContactMaterial* material );
179 
184  bool remove( agx::ContactMaterial* material );
185 
189  const agx::Material* getMaterial(const agx::Name& materialName) const;
190 
194  agx::Material* getMaterial(const agx::Name& materialName);
195 
200 
205 
210 
215  bool remove( agx::Material* material );
216 
222  bool add( agxCollide::Geometry* geometry );
223 
233  bool remove( agxCollide::Geometry* geometry );
234 
242  bool add( agx::RigidBody* body, bool addGeometries = true );
243 
252  bool remove( agx::RigidBody* body, bool removeGeometries = true );
253 
259  bool add( agx::MergedBody* mergedBody );
260 
266  bool remove( agx::MergedBody* mergedBody );
267 
273  bool add( agx::Constraint* constraint );
274 
280  bool remove( agx::Constraint* constraint );
281 
287  bool add( agx::Interaction* interaction );
288 
294  bool remove( agx::Interaction* interaction );
295 
302  bool add( agxSDK::Assembly* assembly, bool addAllEntries = true );
303 
310  bool remove( agxSDK::Assembly* assembly, bool removeAllEntries = true );
311 
317  bool add( agx::Component* subComponent );
318 
324  bool remove( agx::Component* subComponent );
325 
331  bool add(agx::ObserverFrame* observerFrame);
332 
338  bool remove(agx::ObserverFrame* observerFrame);
339 
346  bool contains( const agx::Component* object ) const;
347 
353  bool add( agxControl::Action* action );
354 
360  bool remove( agxControl::Action* action );
361 
367  bool add( agxControl::Operation* operation );
368 
374  bool remove( agxControl::Operation* operation );
375 
381  bool add( agx::ParticleSystem* particleSystem );
382 
388  bool remove( agx::ParticleSystem* particleSystem);
389 
397  bool add( agx::Emitter* emitter, bool addGeometries=true);
398 
406  bool remove(agx::Emitter* emitter, bool removeGeometries=true);
407 
414 
421 
426 
431 
436 
441 
446 
452  bool add( agxSDK::TerrainInstance* terrain );
453 
459  bool remove( agxSDK::TerrainInstance* terrain );
460 
468  bool setUniformGravity( const agx::Vec3& g );
469 
475 
480  void setGravityField( agx::GravityField* gravityField );
481 
484 
487 
494 
501 
507  const agx::RigidBody* getRigidBody( const agx::Name& name ) const;
508 
515 
521  const agx::RigidBody* getRigidBody( const agx::Uuid& uuid ) const;
522 
529 
535  const agx::MergedBody* getMergedBody(const agx::Name& name) const;
536 
543 
549  const agx::MergedBody* getMergedBody(const agx::Uuid& uuid) const;
550 
556  const agx::Constraint* getConstraint( const agx::Uuid& uuid ) const;
557 
564 
570  const agx::Constraint* getConstraint(const agx::Name& name) const;
571 
578 
584  const agxSDK::Assembly* getAssembly(const agx::Name& name) const;
585 
592 
598  const agxSDK::Assembly* getAssembly(const agx::Uuid& uuid) const;
599 
606 
612  const agx::Emitter* getEmitter(const agx::Uuid& uuid) const;
613 
620 
626  agx::Emitter* getEmitter(const agx::Name& name) const;
627 
634 
643  template < typename T >
644  T* getConstraint(const agx::Uuid& uuid);
645 
654  template < typename T >
655  const T* getConstraint(const agx::Uuid& uuid) const;
656 
665  template < typename T >
666  T* getConstraint( const agx::Name& name );
667 
676  template < typename T >
677  const T* getConstraint( const agx::Name& name ) const;
678 
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);
682 
683  GETCONSTRAINT_TYPE(agx::AngularLockJoint, AngularLockJoint)
685  GETCONSTRAINT_TYPE(agx::CylindricalJoint, CylindricalJoint)
686  GETCONSTRAINT_TYPE(agx::DistanceJoint, DistanceJoint)
691  GETCONSTRAINT_TYPE(agx::PrismaticUniversalJoint, PrismaticUniversalJoint)
692  GETCONSTRAINT_TYPE(agx::UniversalJoint, UniversalJoint)
693 #undef GETCONSTRAINT_TYPE
694 
700  const agxCollide::Geometry* getGeometry(const agx::Name& name ) const;
701 
708 
714  const agxCollide::Geometry* getGeometry( const agx::Uuid& uuid ) const;
715 
722 
729 
736 
743 
750 
751 
757  const agxWire::Wire* getWire(const agx::Name& name) const;
758 
765 
771  const agxWire::Wire* getWire(const agx::Uuid& uuid) const;
772 
779 
786 
792  const agx::ObserverFrame* getObserver(const agx::Name& name) const;
793 
800 
806  const agx::ObserverFrame* getObserver(const agx::Uuid& uuid) const;
807 
815 
817  agx::Real getTimeStep() const;
818 
824  bool setTimeStep( agx::Real timeStep );
825 
829  agx::Clock* getClock();
830 
834  const agx::Clock* getClock() const;
835 
840 
844  const agx::Journal* getJournal() const;
845 
846  #if AGX_USE_WEBSOCKETS()
850  agx::RemoteSolver* getRemoteSolver();
851 
855  const agx::RemoteSolver* getRemoteSolver() const;
856  #endif
857 
864  bool breakStepTo();
865 
869  agx::Real getTimeStamp() const;
870 
876 
881  void stepForward();
882 
886  agxCollide::Space* getSpace();
887 
891  const agxCollide::Space* getSpace() const;
892 
896  agx::DynamicsSystem* getDynamicsSystem();
897 
901  const agx::DynamicsSystem* getDynamicsSystem() const;
902 
907 
911  void setPlotSystem(agxPlot::System* plotSystem);
912 
916  void setSpace( agxCollide::Space* space );
917 
922 
923 
930 
941  bool addEventListener( agxSDK::EventListener* listener, int priority = EventManager::DEFAULT_PRIORITY );
942 
953  bool add( agxSDK::EventListener* listener, int priority = EventManager::DEFAULT_PRIORITY );
954 
960  bool remove( agxSDK::EventListener* listener );
961 
966  bool triggerEvent( const GuiEvent& e );
967 
972 
973 #ifdef SWIG
974  enum CleanupSelectionMask {
975  STEP_LISTENERS = 0x1,
976  CONTACT_LISTENERS = 0x2,
977  GUI_LISTENERS = 0x4,
978  LISTENERS = STEP_LISTENERS | CONTACT_LISTENERS | GUI_LISTENERS,
979  SYSTEM = 0x200,
980  SPACE = 0x400,
981  MATERIALS = 0x800,
982  ASSEMBLIES = 0x1000,
983  PARTICLE_SYSTEMS = 0x2000,
984  CONTACT_DATA = 0x4000,
985  CLEANUP_ALL = LISTENERS | SYSTEM | SPACE | MATERIALS | ASSEMBLIES | PARTICLE_SYSTEMS | CONTACT_DATA
986  };
987 #else
993  STEP_LISTENERS = EventManager::STEP_LISTENERS,
994  CONTACT_LISTENERS = EventManager::CONTACT_LISTENERS,
995  GUI_LISTENERS = EventManager::GUI_LISTENERS,
996  LISTENERS = EventManager::LISTENERS,
997  SYSTEM = 0x200,
998  SPACE = 0x400,
999  MATERIALS = 0x800,
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
1005  };
1006 #endif
1007 
1013  READ_NONE = 0x0,
1014  READ_TIMESTEP = 0x1,
1015  READ_TIMESTAMP = 0x2,
1016  READ_GRAVITY = 0x4,
1017  READ_SOLVER = 0x8,
1018  READ_ALL = READ_TIMESTEP + READ_TIMESTAMP + READ_GRAVITY + READ_SOLVER,
1019  READ_DEFAULT = READ_TIMESTEP /* + READ_TIMESTAMP */ + READ_GRAVITY + READ_SOLVER // Not using READ_TIMESTAMP
1020  };
1021 
1029  void cleanup( agx::UInt selection = CLEANUP_ALL, bool fast=false );
1030 
1037 
1041  agxControl::ActionManager* getActionManager();
1042 
1047 
1051  agx::Solver* getSolver();
1052 
1056  const agx::Solver* getSolver() const;
1057 
1061  void setPreIntegratePositions( bool flag );
1062 
1067 
1073  bool add( agxStream::Serializable* object );
1074 
1081 
1082 
1088 
1094 
1099  void setPickHandler( agxSDK::PickHandler* pickHandler );
1100 
1105  void setStatisticsPath( const agx::String& path );
1106 
1111 
1117  void setEnableStatistics( bool enable );
1118 
1120  bool getEnableStatistics() const;
1121 
1123  void setEnableStatisticsRendering( bool enable );
1124 
1127 
1132 
1137 
1141  const AssemblyHash& getAssemblies() const;
1142 
1143 
1147  void getEventListeners( EventListenerPtrVector& eventListeners ) const;
1148 
1153 
1158 
1163 
1164 
1169 
1174 
1179 
1184 
1189 
1194 
1200  const agx::ObserverFrame* getObserverFrame(const agx::Uuid& uuid) const;
1201 
1208 
1214 
1219  const agx::ObserverFrame* getObserverFrame(const agx::Name& name) const;
1220 
1221 
1227  size_t write( const agx::String& filename ) const;
1228 
1235  size_t write( std::ostream& stream, bool binary ) const;
1236 
1243  size_t read( const agx::String& filename, agxSDK::Assembly* parent = nullptr, agx::UInt selection = READ_DEFAULT);
1244 
1253  size_t read( std::istream& stream, bool isBinary, agxSDK::Assembly* parent = nullptr, agx::UInt selection = READ_DEFAULT);
1254 
1260  bool restore(const agx::String& filename, agx::UInt selection = READ_DEFAULT);
1261  bool restore(std::istream& stream, bool isBinary, agx::UInt selection = READ_DEFAULT);
1262 
1263 
1272 
1279 
1284  void store( agxStream::OutputArchive& archive ) const;
1285 
1293  void restore( agxStream::InputArchive& in, agxSDK::Assembly* parent = nullptr, agx::UInt selection = READ_DEFAULT, bool replaceUsingCache = false );
1294 
1302  void setEnableRemoteDebugging( bool flag, agx::Int16 port = -1, bool useCompression = false, bool waitForSynchronization = true );
1303 
1308 
1314 
1319 
1329 
1334 
1341 
1346 
1351 
1356 
1363 
1368 
1373 
1378 
1383 
1394 
1399 
1404 
1409 
1414 
1419 
1420  public:
1421  // Internal, but public methods
1422 
1425 
1431 
1437 
1442 
1443 
1450 
1458 
1465  void commit( agxSDK::SimulationProxy* simulationProxy );
1466 
1472  void handleStabiltyReport( const agx::StabilityReport* stabilityReport );
1473 
1475 
1478  agx::SolveModel* getSolveModel(const agx::Name& name);
1479 
1480  const agx::SolveModelRefVector& getSolveModels() const;
1481 
1482  #if AGX_USE_WEBSOCKETS()
1483  void setRemoteSolver(agx::RemoteSolver* remoteSolver);
1484  #endif
1485 
1488 
1489  static Simulation* load(agx::TiXmlElement* eSimulation, agx::Device* device);
1490 
1493 
1500 
1503 
1504  void addSolveModel(agx::SolveModel* model);
1505  void removeSolveModel(agx::SolveModel* model);
1506  void loadSolveModels(const agx::String& path, bool clear = false);
1507 
1509  void setUseComplexImpactStage(bool flag);
1510 
1511  // For LUA only
1512  agx::Constraint1DOF* getConstraint1DOF(const agx::Name& name) { return this->getConstraint<agx::Constraint1DOF>(name); }
1513  agx::Constraint2DOF* getConstraint2DOF(const agx::Name& name) { return this->getConstraint<agx::Constraint2DOF>(name); }
1514 
1519 
1525 
1530 
1536 
1539 
1543  void dumpTaskTimers(const agx::String& filePath = "BufferAllocations.xml");
1544 
1548  void dumpMemoryUsage(const agx::String& filePath = "TaskTimers.xml");
1549 
1550 
1552  bool allowCreateParticles() const;
1553 
1555  void readStoragePermutations(agxStream::InputArchive& in, bool clearStorages = false);
1557 
1558  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);
1559 
1561 
1562  protected:
1564  friend class GuiEventAdapterImplementation;
1565  friend class agx::DynamicsSystem;
1568 
1570  virtual ~Simulation();
1571 
1572  private:
1573  void addListener(EventListener *listener);
1574  void removeListener(EventListener *listener);
1575  bool hasListener(EventListener *listener);
1576 
1577  private:
1579  void init();
1580 
1582  void initConfiguration();
1583 
1585  void updateStatisticsEnable();
1586 
1587  void setEnableComputeAllConstraintForces(bool flag);
1588  bool getEnableComputeAllConstraintForces() const;
1589 
1591  void resetGraphStatistics();
1592 
1594  agx::Vec4 getSubsystemColor(agx::RigidBody* body);
1595 
1597  void setupStatisticsLogging();
1598 
1599  void updateConstraintForceData();
1600 
1601  void createUpdateTask();
1602 
1603  void generateContactMaterials();
1604  void preCollide();
1605  void prepareContacts();
1606  void triggerParticleContactSensors();
1607  void triggerPreStepEvents();
1608  void triggerPostStepEvents();
1609  void triggerLastStepEvents();
1610  void terrainPostUpdate();
1611  void stepSystem();
1612  void resetDirtyMaterials();
1613  void updateRemoteDebugger();
1614  void recordStatistics();
1615  void recordPlaybackStatistics();
1616  void recordParticleCount();
1617  void recordWarmStartingData();
1618  void printStatistics();
1619  void updateClock();
1620 
1621 
1622  void pruneContacts();
1623  void contactPointReduction();
1624  void updateSleepState();
1625  void triggerPreCollideStepEvent();
1626  void triggerSeparationContactEventListeners();
1627  void triggerContactEventListeners();
1628  void assignContactMaterials();
1629  void dumpThreadLogs(agx::Task *);
1630 
1631  void applyPreIntegrationSettings();
1632 
1633  private:
1634  friend class agx::Solver;
1635  void registerParticleSystemPointers();
1636  void unregisterParticleSystemPointers();
1637  void removeParticleSolverObjects( agx::ParticleSystem* particleSystem );
1638 
1639  private:
1640 
1641  class StatisticsWriter;
1642 
1643  friend class agx::Journal;
1645  #if AGX_USE_WEBSOCKETS()
1646  friend class agx::RemoteSolver;
1647  #endif
1648 
1649  void setJournal(agx::Journal* journal);
1650  void setHasJournal(bool flag);
1651  void preStoreSynchronization();
1652 
1653  StatisticsEntries m_statisticsEntry;
1654  StatisticsWriter* m_statWriter;
1655 
1657 
1658  AssemblyHash m_assemblies;
1659 
1660  agxCollide::SpaceRef m_space;
1661  agx::DynamicsSystemRef m_system;
1662 
1663  agx::ref_ptr<agx::Referenced> m_plotSystem;
1664  agx::ref_ptr<agx::Referenced> m_timeDataSeries;
1665 
1666  agx::ComponentRef m_header;
1667  bool m_stepToStarted;
1668 
1669  EventManagerRef m_eventManager;
1670  MaterialManagerRef m_materialManager;
1671 
1672  agxControl::ActionManagerRef m_actionManager;
1673  agx::TaskRef m_actionManagerTask;
1674 
1675  agx::observer_ptr< Referenced > m_pickHandler;
1676 
1677  SimulationSerializerRef m_serializationListener;
1678 
1679  agx::ParticleSystemRefVector m_particleSystems;
1680  agx::TaskGroupRef m_updateEmitters;
1681  agxData::EntityStorageRef m_emitterStorage;
1682 
1683  agx::ref_ptr<agx::Referenced> m_controlledServer;
1684  agx::ref_ptr<agx::Referenced> m_debugServer;
1685  agx::UInt8 m_contactReductionBinResolution;
1686  agx::UInt m_contactReductionThreshold;
1687  agx::ComponentRefVector m_subComponents;
1688  agx::Real m_remoteDebuggerTimeStep;
1689  agx::TimeStamp m_remoteDebuggerTimeStamp;
1690  agx::TaskGroupRef m_updateTask;
1691  agx::TaskRefVector m_preIntegrateTasks;
1692  bool m_preIntegrate;
1693  bool m_fastCleanup;
1694  bool m_allowCreateParticles;
1695 
1696  agx::Timer m_stepTimer;
1697  agx::Timer m_updateRenderManagerTimer;
1698  agx::ClockRef m_clock;
1699  agx::TaskRef m_renderTask;
1700  agx::GravityFieldRef m_gravityField;
1701 
1702  agx::SolveModelTable m_solveModelTable;
1703  agx::SolveModelRefVector m_solveModels;
1704 
1705  agx::ref_ptr<agx::Referenced> m_renderManager;
1706  agx::Thread* m_mainWorkThread;
1707  agxData::FrameRef m_journalLastWrittenFrame;
1708  agx::UInt32 m_journalAgxArchiveIdCounter;
1709 
1710  void* m_journal;
1711  bool m_hasJournal;
1712  void* m_remoteSolver;
1713 
1714  agxData::EntityStorageRef m_constraintForcesStorage;
1715  bool m_enableComputeAllConstraintForces;
1716  bool m_inDestructor;
1717  SimulationProxyRef m_simulationProxy;
1718  agx::ParticleContactSensorRefVector m_particleContactSensors;
1719 
1721  ParticleContactSensorTable m_particleContactSensorTable;
1722 
1724  RestoreListenerHash m_restoreListeners;
1725  agxSDK::SimulationStatisticsListenerRef m_simulationStatisticsListener;
1726  agx::Real m_profilingFrequency;
1727  agxData::ValueRefT<bool> m_useComplexImpactStage;
1728 
1730  StabilityReportContainer m_stabilityReports;
1731 
1734  MergedBodiesContainer m_mergedBodies;
1735 
1737  MergeSplitHandlerPointer m_mergeSplitHandler;
1738 
1741  LinkedStructureContainer m_linkedStructures;
1742 
1745  TerrainInstanceContainer m_terrains;
1746 
1747  bool m_disableGeometryAutoAdd;
1748  agxSDK::SimulationParameterRefVector m_simulationParameters;
1749 
1750 
1751  agx::RangeJobVector m_postSolveConstraintForceJobs;
1752  agx::ParallelTaskRef m_postSolveConstraintForceTask;
1753 
1754  agx::ref_ptr<agx::Referenced> m_energyManager;
1755  };
1756 
1757  /* Implementation */
1759  {
1760  return m_clock->getTime();
1761  }
1762 
1764  {
1765  return m_space.get();
1766  }
1767 
1769  {
1770  return m_space.get();
1771  }
1772 
1774  {
1775  return m_system.get();
1776  }
1777 
1779  {
1780  return m_system.get();
1781  }
1782 
1784  {
1785  if (m_system) return m_system->getTimeGovernor()->getTimeStep();
1786  else return 0;
1787  }
1788 
1790  {
1791  return m_clock;
1792  }
1793 
1795  {
1796  return m_clock;
1797  }
1798 
1800  {
1801  return m_allowCreateParticles;
1802  }
1803 
1804  AGX_FORCE_INLINE const agx::SolveModelRefVector& Simulation::getSolveModels() const
1805  {
1806  return m_solveModels;
1807  }
1808 
1809  template< typename T >
1811  {
1812  return dynamic_cast< T* >( this->getConstraint( uuid ) );
1813  }
1814 
1815  template< typename T >
1816  const T* Simulation::getConstraint( const agx::Uuid& uuid ) const
1817  {
1818  return dynamic_cast< const T* >( this->getConstraint( uuid ) );
1819  }
1820 
1821  template< typename T >
1823  {
1824  return dynamic_cast< T* >( this->getConstraint( name ) );
1825  }
1826 
1827  template< typename T >
1828  const T* Simulation::getConstraint( const agx::Name& name ) const
1829  {
1830  return dynamic_cast< const T* >( this->getConstraint( name ) );
1831  }
1832 } // namespace agxSDK
1833 
1834 #ifdef _MSC_VER
1835 # pragma warning(pop) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow). Restored.
1836 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define GETCONSTRAINT_TYPE(CLASS_NAME, TYPENAME)
Definition: Simulation.h:679
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:82
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:73
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,...
Definition: Assembly.h:67
Keeps track of the energy flow in the system.
An EventListener can be associated to a Simulation and triggered upon various events.
Definition: EventListener.h:41
Class for storing an Event which will be executed later inside Simulation.
Definition: GuiEvent.h:28
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...
Definition: Simulation.h:127
void readStoragePermutations(agxStream::InputArchive &in, bool clearStorages=false)
MaterialEvent addMaterialEvent
Definition: Simulation.h:145
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)
Definition: Simulation.h:1512
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
Definition: Simulation.h:129
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
agx::Clock * getClock()
Definition: Simulation.h:1789
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
Definition: Simulation.h:139
agx::Event2< Simulation *, agx::Constraint * > ConstraintEvent
Definition: Simulation.h:131
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
Definition: Simulation.h:151
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
Definition: Simulation.h:1804
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.
Definition: Simulation.h:1012
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
Definition: Simulation.h:134
agx::EmitterRefVector getEmitters()
agx::MergeSplit * getMergeSplit()
agx::UInt getNumTerrains() const
agx::Real getTimeStep() const
Definition: Simulation.h:1783
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
Definition: Simulation.h:140
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
Definition: Simulation.h:132
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
Definition: Simulation.h:136
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
Definition: Simulation.h:130
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.
Definition: Simulation.h:992
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
Definition: Simulation.h:143
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
Definition: Simulation.h:1799
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
Definition: Simulation.h:1758
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()
Definition: Simulation.h:1778
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
Definition: Simulation.h:149
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()
Definition: Simulation.h:1763
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
Definition: Simulation.h:137
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
Definition: Simulation.h:142
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
Definition: Simulation.h:148
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)
Definition: Simulation.h:1513
agxWire::Wire * getWire(const agx::Name &name)
Find and return the first matching named wire.
MaterialEvent removeMaterialEvent
Definition: Simulation.h:146
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
Definition: Simulation.h:133
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 reading a binary stream of serialized data.
Definition: InputArchive.h:52
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:57
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...
Definition: Serializable.h:45
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:62
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).
Definition: BallJoint.h:48
Clock class keeps representation of virtual/simulated time.
Definition: Clock.h:38
agx::Real getTime() const
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:39
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
Definition: Constraint.h:677
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
Definition: Constraint.h:762
The base class for a constraint.
Definition: Constraint.h:89
This class store the combine material properties between two agx::Material's.
Definition: Material.h:528
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.
Definition: Device.h:58
This joint will preserve the initial distance between a body and a point in world coordinate or betwe...
Definition: DistanceJoint.h:28
The complete physical system with bodies, interactions, data layout, time stepper,...
Spawns new bodys inside a given volume.
Definition: Emitter.h:45
The class GravityField is responsible for calculating and applying a gravity force on a set of bodies...
Definition: GravityField.h:39
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:104
The base class for interactions.
Definition: Interaction.h:32
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.
Definition: LockJoint.h:29
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:388
Class which will go through contacting/separating bodies and determine if the bodies can be merged (g...
Definition: MergeSplit.h:38
Structure holding several "normal" rigid bodies.
Definition: MergedBody.h:56
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:41
Representation of a name string.
Definition: Name.h:33
With this class you can attach an ObserverFrame object relative to a RigidBody.
Definition: ObserverFrame.h:44
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...
Definition: Prismatic.h:68
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
TaskGroup.
Definition: Task.h:586
A representation of a generic task.
Definition: Task.h:58
agx::Thread is a representation of an OS specific implementation of a computational thread.
Definition: Thread.h:198
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
Definition: Timer.h:75
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...
Definition: Uuid.h:42
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
Templated vector class.
Definition: agx/Vector.h:53
T * get() const
Definition: ref_ptr.h:256
#define CALLABLE
Definition: macros.h:72
#define AGX_FORCE_INLINE
Definition: macros.h:58
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.
Definition: FlowUnit.h:37
Containins classes for sending/reading data over sockets as well as compression functionality.
Definition: MacUtil.h:23
Namespace contains functionality related to plotting.
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
agx::HashVector< agxSDK::Assembly *, agxSDK::AssemblyRef > AssemblyHash
Definition: Simulation.h:117
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...
Definition: InputArchive.h:400
AGXTERRAIN_EXPORT void clear()
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:40
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:40
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42
uint8_t UInt8
Definition: Integer.h:38
agx::Real TimeStamp
Definition: TimeStamp.h:26
void AGXPHYSICS_EXPORT init()
Initialize agx.
int16_t Int16
Definition: Integer.h:44
agx::ref_ptr< Frame > FrameRef
Definition: agx/Frame.h:52