AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
Simulation.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
21#include <agxSDK/agxSDK.h>
24#include <agxSDK/EventManager.h>
26#include <agxSDK/Assembly.h>
30#include <agx/DynamicsSystem.h>
31#include <agx/TimeStamp.h>
32#include <agx/HashTable.h>
33#include <agx/Component.h>
34#include <agx/GravityField.h>
35#include <agx/Clock.h>
37#include <agxData/Frame.h>
38
40
41#include <agxCollide/Space.h>
42
44
46
47#ifdef _MSC_VER
48# pragma warning(push)
49# pragma warning( disable : 4290 ) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
50#endif
51
52namespace agx
53{
54 class Interaction;
55 class ParticleSystem;
56 class RigidBody;
57 class MergedBody;
58 class ParticleEmitter;
59 class RigidBodyEmitter;
60 class Journal;
61 class RemoteSolver;
62 class Solver;
63 class ObserverFrame;
64 class StabilityReport;
65
66 class Hinge;
67 class Prismatic;
68 class DistanceJoint;
69 class LockJoint;
70 class BallJoint;
71 class PlaneJoint;
72 class AngularLockJoint;
73 class CylindricalJoint;
74 class UniversalJoint;
75 class PrismaticUniversalJoint;
76}
77
78namespace agxCollide
79{
80 class Geometry;
81}
82
83namespace agxNet
84{
85 class RemoteDebugClient;
86}
87
88namespace agxRender
89{
90 class RenderManager;
91}
92
93namespace agxWire
94{
95 class Wire;
96}
97
98namespace agxModel
99{
100 class SurfaceVelocityConveyorBelt;
101}
102
103namespace agxPlot
104{
105 class System;
106 class DataSeries;
107}
108
109namespace agxSDK
110{
111 class SimulationFrameReader;
112 class SimulationFrameWriter;
113 class EventListener;
114 class SimulationFrameWriter;
115 class GuiEventAdapterImplementation;
116 class PickHandler;
117 class MergeSplitHandler;
118 class TerrainInstance;
119 class TerrainToolInstance;
120 class EnergyManager;
121 class ISensorEnvironment;
122
124
131 {
132 public:
139
142
145
148
151
154
156
157 public:
163
164 public:
170
176 bool add( agx::Material* material );
177
182 bool add( agx::ContactMaterial* material );
183
188 bool remove( agx::ContactMaterial* material );
189
193 const agx::Material* getMaterial(const agx::Name& materialName) const;
194
198 agx::Material* getMaterial(const agx::Name& materialName);
199
204
209
214
219 bool remove( agx::Material* material );
220
226 bool add( agxCollide::Geometry* geometry );
227
237 bool remove( agxCollide::Geometry* geometry );
238
246 bool add( agx::RigidBody* body, bool addGeometries = true );
247
256 bool remove( agx::RigidBody* body, bool removeGeometries = true );
257
263 bool add( agx::MergedBody* mergedBody );
264
270 bool remove( agx::MergedBody* mergedBody );
271
277 bool add( agx::Constraint* constraint );
278
284 bool remove( agx::Constraint* constraint );
285
291 bool add( agx::Interaction* interaction );
292
298 bool remove( agx::Interaction* interaction );
299
306 bool add( agxSDK::Assembly* assembly, bool addAllEntries = true );
307
314 bool remove( agxSDK::Assembly* assembly, bool removeAllEntries = true );
315
321 bool add( agx::Component* subComponent );
322
328 bool remove( agx::Component* subComponent );
329
335 bool add(agx::ObserverFrame* observerFrame);
336
342 bool remove(agx::ObserverFrame* observerFrame);
343
350 bool contains( const agx::Component* object ) const;
351
358 bool contains(const agxSDK::TerrainInstance* terrain) const;
359
366 bool contains(const agxSDK::TerrainToolInstance* toolInstance) const;
367
373 bool add( agxControl::Action* action );
374
380 bool remove( agxControl::Action* action );
381
387 bool add( agxControl::Operation* operation );
388
394 bool remove( agxControl::Operation* operation );
395
401 bool add( agx::ParticleSystem* particleSystem );
402
408 bool remove( agx::ParticleSystem* particleSystem);
409
417 bool add( agx::Emitter* emitter, bool addGeometries=true);
418
426 bool remove(agx::Emitter* emitter, bool removeGeometries=true);
427
434
441
446
451
456
461
466
472 bool add( agxSDK::TerrainInstance* terrain );
473
480
486 bool add( agxSDK::TerrainToolInstance* toolInstance );
487
493 bool remove( agxSDK::TerrainToolInstance* toolInstance );
494
502 bool setUniformGravity( const agx::Vec3& g );
503
509
514 void setGravityField( agx::GravityField* gravityField );
515
518
521
528
535
541 const agx::RigidBody* getRigidBody( const agx::Name& name ) const;
542
549
555 const agx::RigidBody* getRigidBody( const agx::Uuid& uuid ) const;
556
563
569 const agx::MergedBody* getMergedBody(const agx::Name& name) const;
570
577
583 const agx::MergedBody* getMergedBody(const agx::Uuid& uuid) const;
584
590 const agx::Constraint* getConstraint( const agx::Uuid& uuid ) const;
591
598
604 const agx::Constraint* getConstraint(const agx::Name& name) const;
605
612
618 const agxSDK::Assembly* getAssembly(const agx::Name& name) const;
619
626
632 const agxSDK::Assembly* getAssembly(const agx::Uuid& uuid) const;
633
640
646 const agx::Emitter* getEmitter(const agx::Uuid& uuid) const;
647
654
660 agx::Emitter* getEmitter(const agx::Name& name) const;
661
668
677 template < typename T >
678 T* getConstraint(const agx::Uuid& uuid);
679
688 template < typename T >
689 const T* getConstraint(const agx::Uuid& uuid) const;
690
699 template < typename T >
700 T* getConstraint( const agx::Name& name );
701
710 template < typename T >
711 const T* getConstraint( const agx::Name& name ) const;
712
713#define GETCONSTRAINT_TYPE(CLASS_NAME, TYPENAME) \
714 CLASS_NAME *get ## TYPENAME(const agx::Name& name); \
715 CLASS_NAME *get ##TYPENAME(const agx::Uuid& uuid);
716
725 GETCONSTRAINT_TYPE(agx::PrismaticUniversalJoint, PrismaticUniversalJoint)
727#undef GETCONSTRAINT_TYPE
728
734 const agxCollide::Geometry* getGeometry(const agx::Name& name ) const;
735
742
748 const agxCollide::Geometry* getGeometry( const agx::Uuid& uuid ) const;
749
756
763
770
777
784
785
791 const agxWire::Wire* getWire(const agx::Name& name) const;
792
799
805 const agxWire::Wire* getWire(const agx::Uuid& uuid) const;
806
813
820
826 const agx::ObserverFrame* getObserver(const agx::Name& name) const;
827
834
840 const agx::ObserverFrame* getObserver(const agx::Uuid& uuid) const;
841
849
851 agx::Real getTimeStep() const;
852
858 bool setTimeStep( agx::Real timeStep );
859
863 agx::Clock* getClock();
864
868 const agx::Clock* getClock() const;
869
874
878 const agx::Journal* getJournal() const;
879
880 #if AGX_USE_WEBSOCKETS()
884 agx::RemoteSolver* getRemoteSolver();
885
889 const agx::RemoteSolver* getRemoteSolver() const;
890 #endif
891
899
903 agx::Real getTimeStamp() const;
904
910
916 void setFrame(agx::UInt frame);
917
922
928
932 agxCollide::Space* getSpace();
933
937 const agxCollide::Space* getSpace() const;
938
942 agx::DynamicsSystem* getDynamicsSystem();
943
947 const agx::DynamicsSystem* getDynamicsSystem() const;
948
953
958
963
968
969
976
987 bool addEventListener( agxSDK::EventListener* listener, int priority = EventManager::DEFAULT_PRIORITY );
988
999 bool add( agxSDK::EventListener* listener, int priority = EventManager::DEFAULT_PRIORITY );
1000
1007
1012 bool triggerEvent( const GuiEvent& e );
1013
1018
1019#ifdef SWIG
1021 STEP_LISTENERS = 0x1,
1022 CONTACT_LISTENERS = 0x2,
1023 GUI_LISTENERS = 0x4,
1024 LISTENERS = STEP_LISTENERS | CONTACT_LISTENERS | GUI_LISTENERS,
1025 SYSTEM = 0x200,
1026 SPACE = 0x400,
1027 MATERIALS = 0x800,
1028 ASSEMBLIES = 0x1000,
1029 PARTICLE_SYSTEMS = 0x2000,
1030 CONTACT_DATA = 0x4000,
1031 CLEANUP_ALL = LISTENERS | SYSTEM | SPACE | MATERIALS | ASSEMBLIES | PARTICLE_SYSTEMS | CONTACT_DATA
1032 };
1033#else
1039 STEP_LISTENERS = EventManager::STEP_LISTENERS,
1040 CONTACT_LISTENERS = EventManager::CONTACT_LISTENERS,
1041 GUI_LISTENERS = EventManager::GUI_LISTENERS,
1042 LISTENERS = EventManager::LISTENERS,
1043 SYSTEM = 0x200,
1044 SPACE = 0x400,
1045 MATERIALS = 0x800,
1046 ASSEMBLIES = 0x1000,
1047 PARTICLE_SYSTEMS = 0x2000,
1048 CONTACT_DATA = 0x4000,
1049 PLOTSYSTEM = 0x8000,
1050 CLEANUP_ALL = LISTENERS | SYSTEM | SPACE | MATERIALS | ASSEMBLIES | PARTICLE_SYSTEMS | CONTACT_DATA | PLOTSYSTEM
1052#endif
1053
1059 READ_NONE = 0x0,
1060 READ_TIMESTEP = 0x1,
1061 READ_TIMESTAMP = 0x2,
1062 READ_GRAVITY = 0x4,
1063 READ_SOLVER = 0x8,
1064 READ_ALL = READ_TIMESTEP + READ_TIMESTAMP + READ_GRAVITY + READ_SOLVER,
1065 READ_DEFAULT = READ_TIMESTEP /* + READ_TIMESTAMP */ + READ_GRAVITY + READ_SOLVER // Not using READ_TIMESTAMP
1067
1075 void cleanup( agx::UInt selection = CLEANUP_ALL, bool fast=false );
1076
1083
1087 agxControl::ActionManager* getActionManager();
1088
1093
1097 agx::Solver* getSolver();
1098
1102 const agx::Solver* getSolver() const;
1103
1107 void setPreIntegratePositions( bool flag );
1108
1113
1120
1127
1128
1134
1140
1146
1151 void setStatisticsPath( const agx::String& path );
1152
1157
1163 void setEnableStatistics( bool enable );
1164
1167
1169 void setEnableStatisticsRendering( bool enable );
1170
1173
1178
1183
1188
1193
1197 void getEventListeners( EventListenerPtrVector& eventListeners ) const;
1198
1203
1208
1213
1214
1219
1224
1229
1234
1239
1244
1251
1258
1264
1270
1271
1277 size_t write( const agx::String& filename ) const;
1278
1285 size_t write( std::ostream& stream, bool binary ) const;
1286
1293 size_t read( const agx::String& filename, agxSDK::Assembly* parent = nullptr, agx::UInt selection = READ_DEFAULT);
1294
1303 size_t read( std::istream& stream, bool isBinary, agxSDK::Assembly* parent = nullptr, agx::UInt selection = READ_DEFAULT);
1304
1310 bool restore(const agx::String& filename, agx::UInt selection = READ_DEFAULT);
1311 bool restore(std::istream& stream, bool isBinary, agx::UInt selection = READ_DEFAULT);
1312
1313
1322
1329
1334 void store( agxStream::OutputArchive& archive ) const;
1335
1344 agxSDK::Assembly* parent = nullptr,
1345 agx::UInt selection = READ_DEFAULT,
1346 bool replaceUsingCache = false );
1347
1355 void setEnableRemoteDebugging( bool flag, agx::Int16 port = -1,
1356 bool useCompression = false,
1357 bool waitForSynchronization = true );
1358
1363
1369
1374
1383 void setEnableWebDebugger(bool flag, agx::UInt16 port=9001);
1384
1389
1390 #if AGX_USE_WEB_DEBUGGER()
1391
1395 agxSDK::RemoteDebugRenderProxyFactory* getWebDebugger();
1396
1401 const agxSDK::RemoteDebugRenderProxyFactory* getWebDebugger() const;
1402 #endif
1403
1413
1418
1425
1430
1437
1442
1447
1452
1457
1468
1473
1478
1483
1488
1493
1501
1506
1507 public:
1508 // Internal, but public methods
1509
1512
1518
1524
1529
1530
1537
1545
1552 void commit( agxSDK::SimulationProxy* simulationProxy );
1553
1559 void handleStabiltyReport( const agx::StabilityReport* stabilityReport );
1560
1562
1565 agx::SolveModel* getSolveModel(const agx::Name& name);
1566
1567 const agx::SolveModelRefVector& getSolveModels() const;
1568
1569 #if AGX_USE_WEBSOCKETS()
1570 void setRemoteSolver(agx::RemoteSolver* remoteSolver);
1571 #endif
1572
1575
1576 static Simulation* load(agx::TiXmlElement* eSimulation, agx::Device* device);
1577
1580
1587
1590
1591 void addSolveModel(agx::SolveModel* model);
1592 void removeSolveModel(agx::SolveModel* model);
1593 void loadSolveModels(const agx::String& path, bool clear = false);
1594
1595 // For LUA only
1596 agx::Constraint1DOF* getConstraint1DOF(const agx::Name& name) { return this->getConstraint<agx::Constraint1DOF>(name); }
1597 agx::Constraint2DOF* getConstraint2DOF(const agx::Name& name) { return this->getConstraint<agx::Constraint2DOF>(name); }
1598
1603
1609
1614
1620
1621 agxSDK::TerrainManager* getTerrainManager() const;
1622
1625
1629 void dumpTaskTimers(const agx::String& filePath = "BufferAllocations.xml");
1630
1634 void dumpMemoryUsage(const agx::String& filePath = "TaskTimers.xml");
1635
1636
1638 bool allowCreateParticles() const;
1639
1641 void readStoragePermutations(agxStream::InputArchive& in, bool clearStorages = false);
1643
1644 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);
1645
1647
1649
1651
1653
1671 bool enableThreadTimeline(const agx::String& sessionName = "",
1672 const agx::String& journalName = "Profiling.agxJournal");
1673
1687 bool disableThreadTimeline(const agx::String& format = "chrome");
1688
1689
1690 protected:
1692 friend class GuiEventAdapterImplementation;
1696
1698 virtual ~Simulation();
1699
1700 private:
1703
1704 private:
1705 void addListener(EventListener *listener);
1706 void removeListener(EventListener *listener);
1707 bool hasListener(EventListener *listener);
1708
1709 private:
1711 void init();
1712
1714 void initConfiguration();
1715
1717 void updateStatisticsEnable();
1718
1719 void setEnableComputeAllConstraintForces(bool flag);
1720 bool getEnableComputeAllConstraintForces() const;
1721
1723 void resetGraphStatistics();
1724
1726 agx::Vec4 getSubsystemColor(agx::RigidBody* body);
1727
1729 void setupStatisticsLogging();
1730
1731 void updateConstraintForceData();
1732
1733 void createUpdateTask();
1734
1735 void generateContactMaterials();
1736 void preCollide();
1737 void prepareContacts();
1738 void triggerParticleContactSensors();
1739 void triggerPreStepEvents();
1740 void triggerPostStepEvents();
1741 void triggerLastStepEvents();
1742 void terrainPostUpdate();
1743 void stepSystem();
1744 void resetDirtyMaterials();
1745 void updateRemoteDebugger();
1746 void recordStatistics();
1747 void recordPlaybackStatistics();
1748 void recordParticleCount();
1749 void recordWarmStartingData();
1750 void printStatistics();
1751 void updateClock();
1752
1753
1754 void pruneContacts();
1755 void contactPointReduction();
1756 void updateSleepState();
1757 void triggerPreCollideStepEvent();
1758 void triggerSeparationContactEventListeners();
1759 void triggerContactEventListeners();
1760 void assignContactMaterials();
1761 void dumpThreadLogs(agx::Task *);
1762
1763 void applyPreIntegrationSettings();
1764
1765 private:
1766 friend class agx::Solver;
1767 void registerParticleSystemPointers();
1768 void unregisterParticleSystemPointers();
1769 void removeParticleSolverObjects( agx::ParticleSystem* particleSystem );
1770
1771 private:
1772 class StatisticsWriter;
1773
1774 friend class agx::Journal;
1776 #if AGX_USE_WEBSOCKETS()
1777 friend class agx::RemoteSolver;
1778 #endif
1779
1780 void setJournal(agx::Journal* journal);
1781 void setHasJournal(bool flag);
1782 void preStoreSynchronization();
1783
1784 StatisticsEntries m_statisticsEntry;
1785 StatisticsWriter* m_statWriter;
1786
1788
1789 AssemblyHash m_assemblies;
1790
1791 agxCollide::SpaceRef m_space;
1792 agx::DynamicsSystemRef m_system;
1793
1794 ReferencedRef m_plotSystem;
1795 ReferencedRef m_timeDataSeries;
1796
1797 agx::ComponentRef m_header;
1798 bool m_stepToStarted;
1799
1800 EventManagerRef m_eventManager;
1801 MaterialManagerRef m_materialManager;
1802
1803 agxControl::ActionManagerRef m_actionManager;
1804 agx::TaskRef m_actionManagerTask;
1805
1806 agx::observer_ptr< Referenced > m_pickHandler;
1807
1808 SimulationSerializerRef m_serializationListener;
1809
1810 agx::ParticleSystemRefVector m_particleSystems;
1811 agx::TaskGroupRef m_updateEmitters;
1812 agxData::EntityStorageRef m_emitterStorage;
1813
1814 ReferencedRef m_controlledServer;
1815 ReferencedRef m_debugServer;
1816 agx::UInt8 m_contactReductionBinResolution;
1817 agx::UInt m_contactReductionThreshold;
1818 agx::ComponentRefVector m_subComponents;
1819 agx::Real m_remoteDebuggerTimeStep;
1820 agx::TimeStamp m_remoteDebuggerTimeStamp;
1821 agx::TaskGroupRef m_updateTask;
1822 agx::TaskRefVector m_preIntegrateTasks;
1823 bool m_preIntegrate;
1824 bool m_fastCleanup;
1825 bool m_allowCreateParticles;
1826
1827 agx::Timer m_stepTimer;
1828 agx::Timer m_updateRenderManagerTimer;
1829 agx::ClockRef m_clock;
1830 agx::TaskRef m_renderTask;
1831 agx::GravityFieldRef m_gravityField;
1832
1833 agx::SolveModelTable m_solveModelTable;
1834 agx::SolveModelRefVector m_solveModels;
1835
1836 ReferencedRef m_renderManager;
1837 bool m_clearRenderTemporaries;
1838 agx::Thread* m_mainWorkThread;
1839 agxData::FrameRef m_journalLastWrittenFrame;
1840 agx::UInt32 m_journalAgxArchiveIdCounter;
1841
1842 void* m_journal;
1843 bool m_hasJournal;
1844 void* m_remoteSolver;
1845
1846 agx::ref_ptr<agx::Referenced> m_profilingJournal;
1847
1848 agxData::EntityStorageRef m_constraintForcesStorage;
1849 bool m_enableComputeAllConstraintForces;
1850 bool m_inDestructor;
1851 SimulationProxyRef m_simulationProxy;
1852 agx::ParticleContactSensorRefVector m_particleContactSensors;
1853
1855 ParticleContactSensorTable m_particleContactSensorTable;
1856
1858 RestoreListenerHash m_restoreListeners;
1859 agxSDK::SimulationStatisticsListenerRef m_simulationStatisticsListener;
1860 agx::Real m_profilingFrequency;
1861
1863 StabilityReportContainer m_stabilityReports;
1864
1867 MergedBodiesContainer m_mergedBodies;
1868
1870 MergeSplitHandlerPointer m_mergeSplitHandler;
1871
1874 LinkedStructureContainer m_linkedStructures;
1875
1878 DeformableObjectContainer m_deformableObjects;
1879
1880 bool m_disableGeometryAutoAdd;
1881 agxSDK::SimulationParameterRefVector m_simulationParameters;
1882
1883 agx::RangeJobVector m_postSolveConstraintForceJobs;
1884 agx::ParallelTaskRef m_postSolveConstraintForceTask;
1885
1886 ReferencedRef m_energyManager;
1887 ReferencedRef m_sensorEnvironment;
1888 agxSDK::TerrainManagerRef m_terrainManager;
1889
1890 #if AGX_USE_WEB_DEBUGGER()
1892 #endif
1893 };
1894
1895 /* Implementation */
1897 {
1898 return m_clock->getTime();
1899 }
1900
1902 {
1903 return m_space.get();
1904 }
1905
1907 {
1908 return m_space.get();
1909 }
1910
1912 {
1913 return m_system.get();
1914 }
1915
1917 {
1918 return m_system.get();
1919 }
1920
1922 {
1923 if (m_system) return m_system->getTimeGovernor()->getTimeStep();
1924 else return 0;
1925 }
1926
1928 {
1929 return m_clock;
1930 }
1931
1933 {
1934 return m_clock;
1935 }
1936
1938 {
1939 return m_allowCreateParticles;
1940 }
1941
1942 AGX_FORCE_INLINE const agx::SolveModelRefVector& Simulation::getSolveModels() const
1943 {
1944 return m_solveModels;
1945 }
1946
1947 template< typename T >
1949 {
1950 return dynamic_cast< T* >( this->getConstraint( uuid ) );
1951 }
1952
1953 template< typename T >
1954 const T* Simulation::getConstraint( const agx::Uuid& uuid ) const
1955 {
1956 return dynamic_cast< const T* >( this->getConstraint( uuid ) );
1957 }
1958
1959 template< typename T >
1961 {
1962 return dynamic_cast< T* >( this->getConstraint( name ) );
1963 }
1964
1965 template< typename T >
1966 const T* Simulation::getConstraint( const agx::Name& name ) const
1967 {
1968 return dynamic_cast< const T* >( this->getConstraint( name ) );
1969 }
1970} // namespace agxSDK
1971
1972#ifdef _MSC_VER
1973# pragma warning(pop) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow). Restored.
1974#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define GETCONSTRAINT_TYPE(CLASS_NAME, TYPENAME)
Definition: Simulation.h:713
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:86
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 that encapsulates data to be plotted, including methods for accessing the data,...
Definition: DataSeries.h:45
System that manages the plotting system.
Definition: System.h:39
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:70
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:40
Class for storing an Event which will be executed later inside Simulation.
Definition: GuiEvent.h:28
Interface to a cooperative sensor simulation assumed to be executed in a separate thread spawned in a...
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:131
void readStoragePermutations(agxStream::InputArchive &in, bool clearStorages=false)
agx::Constraint1DOF * getConstraint1DOF(const agx::Name &name)
Definition: Simulation.h:1596
agx::Journal * getJournal()
MaterialEvent addMaterialEvent
Definition: Simulation.h:149
const agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
bool add(agx::RigidBody *body, bool addGeometries=true)
agx::ObserverFrame * getObserver(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
const agx::RigidBody * getRigidBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a RigidBody with the given uuid.
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::EventListener * getEventListener(const agx::Name &name)
Find and return the first matching named event listener.
bool getEnableStatistics() const
bool add(agx::ParticleContactSensor *sensor)
Add a particle contact sensor to the Simulation.
bool contains(const agx::Component *object) const
Is the object contained in the simulation?
agxSDK::Assembly * getAssembly(const agx::Name &name)
Find (linear search) and return named Assembly.
const agx::Material * getMaterial(const agx::Name &materialName) const
agx::Event2< Simulation *, agxCollide::Geometry * > GeometryEvent
Definition: Simulation.h:133
void setEnableSimulationStatisticsListener(bool flag)
Enable/disable the listener that collects all statistics data from the simulation.
const agxSDK::PickHandler * getPickHandler() const
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.
agx::UInt getFrame() const
agxSDK::SimulationParameter * getParameter(const agx::Name &name)
agx::Constraint * getConstraint(const agx::Uuid &uuid)
Find and return a pointer to a Constraint with the given uuid.
bool setTimeStep(agx::Real timeStep)
Sets the time step determined by the TimeGovernor in the DynamicsSystem.
agx::Constraint * getConstraint(const agx::Name &name)
Find (linear search) and return named Constraint.
bool add(agx::Material *material)
Add a material to the simulation.
ISensorEnvironment * getSensorEnvironment() const
agx::Clock * getClock()
Definition: Simulation.h:1927
agx::Emitter * getEmitter(const agx::Uuid &uuid)
Find (linear search) and return an emitter matching the given uuid.
const agx::ObserverFrame * getObserverFrame(const agx::Name &name) const
Find (linear search) the first ObserverFrame object in the system that matches the name.
void setPickHandler(agxSDK::PickHandler *pickHandler)
Assign interface for pick handler.
agx::ConstraintRefSetVector & getConstraints()
bool remove(agx::Interaction *interaction)
Remove an Interaction from the Simulation.
void updateActionManager()
Internal method.
const agxCollide::GeometryRefVector & getGeometries() const
bool contains(const agxSDK::TerrainInstance *terrain) const
Is the terrain contained in the simulation?
agx::UInt getContactReductionThreshold() const
bool removeRestoreListener(agxStream::RestoreListener *listener)
Remove an existing listener in a simulation.
agxRender::RenderManager * getRenderManager()
const agx::RigidBody * getRigidBody(const agx::Name &name) const
Find (linear search) and return named RigidBody.
void setEnableStatisticsRendering(bool enable)
void sendSimulation()
Send the simulation to the remote debugger (if enabled)
bool remove(agxSDK::TerrainToolInstance *toolInstance)
Remove a terrain tool instance from this simulation.
bool remove(agxSDK::EventListener *listener)
Remove a Event listener.
agx::RigidBodyRefVector & getRigidBodies()
const agxSDK::SimulationParameterRefVector & getParameters() const
const MaterialManager * getMaterialManager() const
const agx::ConstraintRefSetVector & getConstraints() const
const AssemblyHash & getAssemblies() const
agx::ParticleSystem * getParticleSystem() const
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.
RigidBodyEvent addRigidBodyEvent
Definition: Simulation.h:143
agx::Event2< Simulation *, agx::Constraint * > ConstraintEvent
Definition: Simulation.h:135
agxSDK::TerrainManager * getTerrainManager() const
bool add(agxControl::Operation *operation)
Register an operation to this simulation.
const agx::RigidBodyRefVector & getRigidBodies() const
void getEventListeners(EventListenerPtrVector &eventListeners) const
Get a vector containing all the registered event listeners.
agx::ParticleEmitterRefVector getParticleEmitters()
agx::ObserverFrame * getObserver(const agx::Name &name)
Find (linear search) and return named ObserverFrame.
void clearContactData()
Clears contact data in the simulation.
void addSolveModel(agx::SolveModel *model)
bool removeEventListener(agxSDK::EventListener *listener)
Remove the specified listener.
const SimulationSerializer * getSerializer() const
const agx::MergedBody * getMergedBody(const agx::Name &name) const
Find (linear search) and return named MergedBody.
bool add(agx::Constraint *constraint)
Add a constraint to the simulation.
void setEnableWebDebugger(bool flag, agx::UInt16 port=9001)
Enable/Disable the Web debugger simulation WebSocket API.
agx::ObserverFrameRefSetVector & getObserverFrames()
const agx::ParticleSystemRefVector & getParticleSystems() const
agx::RigidBodyPtrSetVector & getEnabledRigidBodies()
bool add(agxSDK::TerrainInstance *terrain)
Add terrain (agxTerrain::Terrain) instance to this simulation.
JournalAttachEvent journalAttachedEvent
Definition: Simulation.h:155
bool add(agx::ContactMaterial *material)
Add an explicit contact material to the simulation.
agxSDK::TerrainInstance * getTerrain(agx::UInt i) const
void stepForward()
Take one step forward in the simulation.
static Simulation * load(agx::TiXmlElement *eSimulation, agx::Device *device)
agx::Emitter * getEmitter(const agx::Name &name) const
Find (linear search) and return an emitter matching the given name.
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.
agx::SolveModel * getSolveModel(const agx::Name &name)
const agx::SolveModelRefVector & getSolveModels() const
Definition: Simulation.h:1942
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:1058
agxSDK::PickHandler * getPickHandler()
agxWire::Wire * getWire(const agx::Uuid &uuid)
Find (linear search) and return the first wire matching the uuid.
bool add(agx::ParticleSystem *particleSystem)
Add a particle system to the simulation.
bool remove(agx::RigidBody *body, bool removeGeometries=true)
Remove a body from the Simulation, the body will be disabled!
void triggerPostIntegrateEvents()
agx::ObserverFrame * getObserverFrame(const agx::Uuid &uuid)
Find and return a pointer to a ObserverFrame with the given uuid.
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 agx::ObserverFrameRefSetVector & getObserverFrames() const
Simulation()
Default constructor This constructor CAN Throw a std::runtime_exception if configuration file is brok...
agx::Material * getMaterial(const agx::Name &materialName)
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.
agxSDK::Assembly * getAssembly(const agx::Uuid &uuid)
Find (linear search) and return an Assembly matching the given uuid.
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.
bool enableThreadTimeline(const agx::String &sessionName="", const agx::String &journalName="Profiling.agxJournal")
Record profiling information from this simulation and store it in a journal.
void setStatisticsInterval(agx::Real interval)
const agxRender::RenderManager * getRenderManager() const
agx::Event2< Simulation *, agx::Journal * > JournalAttachEvent
Definition: Simulation.h:138
agx::EmitterRefVector getEmitters()
agxSDK::EnergyManager * getEnergyManager() const
return the energy manager of the system.
agx::UInt getNumTerrains() const
agx::Real getTimeStep() const
Definition: Simulation.h:1921
agx::Real getProfilingFrequency() const
void setSensorEnvironment(ISensorEnvironment *environment)
Assign new sensor environment to this simulation, nullptr to remove the current environment.
agx::Real getRemoteDebuggingTimeStep() const
bool getEnableClearRenderTemporaries() const
bool remove(agxSDK::SimulationParameter *parameter)
Remove a parameter from the simulation configuration interface.
const agx::Journal * getJournal() const
RigidBodyEvent removeRigidBodyEvent
Definition: Simulation.h:144
MaterialManager * getMaterialManager()
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.
bool disableThreadTimeline(const agx::String &format="chrome")
Stops recording timeline data and exports gathered data to disk.
void setActionManagerTimeStamp(const agx::TimeStamp &time)
Truncating an AGX simulation does not reset the timestamp in the action manager.
agxSDK::EventListener * getEventListener(const agx::Uuid &uuid)
Find (linear search) and return the first event listener matching the uuid.
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.
agx::Event2< Simulation *, agx::Material * > MaterialEvent
Definition: Simulation.h:136
agx::MergedBody * getMergedBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a MergedBody with the given uuid.
const agx::Constraint * getConstraint(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a Constraint with the given uuid.
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.
agxPlot::DataSeries * getTimeDataSeries() const
A data series that contains all time stamps of the simulation.
GeometryEvent addGeometryEvent
Definition: Simulation.h:140
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 dumpMemoryUsage(const agx::String &filePath="TaskTimers.xml")
Print current agxData buffer allocations to a file.
const agx::GravityField * getGravityField() const
const agxWire::Wire * getWire(const agx::Uuid &uuid) const
Find (linear search) and return the first wire matching the uuid.
agxControl::ActionManager * getActionManager()
Gets the action manager.
bool remove(agxControl::Action *action)
Remove an action from this simulation.
agx::Event2< Simulation *, agx::RigidBody * > RigidBodyEvent
Definition: Simulation.h:134
agxCollide::Geometry * getGeometry(const agx::Uuid &uuid)
Find (linear search) and return a geometry matching the given uuid.
virtual ~Simulation()
Destructor.
void setSpace(agxCollide::Space *space)
Replace the current Collision space with space.
void removeSolveModel(agx::SolveModel *model)
agxPlot::System * getPlotSystem() const
agxCollide::Geometry * getGeometry(const agx::Name &name)
Find (linear search) and return named collision Geometry.
CleanupSelectionMask
Specification of what should be cleaned up from a simulation during a call to the cleanup() method.
Definition: Simulation.h:1038
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.
const agxSDK::Assembly * getAssembly(const agx::Uuid &uuid) const
Find (linear search) and return an Assembly matching the given uuid.
agx::MergedBody * getMergedBody(agx::UInt i) const
ConstraintEvent removeConstraintEvent
Definition: Simulation.h:147
agx::Component * getHeader()
agx::Solver * getSolver()
void setFrame(agx::UInt frame)
Set the current simulation frame to a specific value (mostly for internal use or during a reset of a ...
bool add(agx::MergedBody *mergedBody)
Add a merged body to this simulation.
const agx::ObserverFrame * getObserver(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a ObserverFrame with the given uuid.
void setPreIntegratePositions(bool flag)
Set true to integrate positions at the start of the timestep rather than at the end.
bool contains(const agxSDK::TerrainToolInstance *toolInstance) const
Is the terrain tool instance contained in the simulation?
bool remove(agxCollide::Geometry *geometry)
Remove geometry from collision space.
const agxCollide::Geometry * getGeometry(const agx::Uuid &uuid) const
Find (linear search) and return a geometry matching the given uuid.
bool allowCreateParticles() const
Definition: Simulation.h:1937
const agx::ObserverFrame * getObserver(const agx::Name &name) const
Find (linear search) and return named ObserverFrame.
agx::Vec3 getUniformGravity() const
If the current gravity field is not a uniform one (for example PointGravityField),...
bool getEnableWebDebugger() const
void handleStabiltyReport(const agx::StabilityReport *stabilityReport)
Internal method.
void setDynamicsSystem(agx::DynamicsSystem *system)
Replace the current DynamicsSystem with system.
static agx::Model * ClassModel()
Internal method.
agx::GravityField * getGravityField()
agx::Real getTimeStamp() const
Definition: Simulation.h:1896
bool add(agxControl::Action *action)
Register an action to this simulation.
void dumpTaskTimers(const agx::String &filePath="BufferAllocations.xml")
Print current task performance timers to a file.
void setMainWorkThread(agx::Thread *thread)
Specify which is the main working thread for the Simulation.
bool add(agx::ObserverFrame *observerFrame)
Add a ObserverFrame to the Simulation.
bool triggerEvent(const GuiEvent &e)
Execute a GuiEvent.
const agxSDK::EventListener * getEventListener(const agx::Name &name) const
Find and return the first matching named event listener.
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.
agx::Material * getMaterial(const agx::Uuid &uuid)
agxSDK::MergeSplitHandler * getMergeSplitHandler() const
Merge split handler is an object that enables performance boosts by merging rigid bodies together whi...
size_t write(const agx::String &filename) const
Serialize the simulation to the specified file.
agx::DynamicsSystem * getDynamicsSystem()
Definition: Simulation.h:1916
const agx::MergedBody * getMergedBody(const agx::Uuid &uuid) const
Find (linear search) and return a pointer to a MergedBody with the given uuid.
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.
const agx::Solver * getSolver() const
agx::RigidBody * getRigidBody(const agx::Name &name)
Find (linear search) and return named RigidBody.
ContactMaterialEvent removeContactMaterialEvent
Definition: Simulation.h:153
bool add(agxSDK::TerrainToolInstance *toolInstance)
Add a terrain tool instance to this simulation.
const agx::Constraint * getConstraint(const agx::Name &name) const
Find (linear search) and return named Constraint.
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.
const agxCollide::Geometry * getGeometry(const agx::Name &name) const
Find (linear search) and return named collision Geometry.
bool remove(agxControl::Operation *operation)
Remove an operation from this simulation.
agxCollide::Space * getSpace()
Definition: Simulation.h:1901
const agx::Emitter * getEmitter(const agx::Uuid &uuid) const
Find (linear search) and return an emitter matching the given uuid.
bool breakStepTo()
Break an initiated stepTo() after the current simulation step.
void setRemoteDebuggingTimeStep(agx::Real timeStep)
Sets the time step for remote debugging.
agx::ObserverFrame * getObserverFrame(const agx::Name &name)
Find (linear search) the first ObserverFrame object in the system that matches the name.
GeometryEvent removeGeometryEvent
Definition: Simulation.h:141
SimulationStatisticsListener * getSimulationStatisticsListener()
agx::ParticleSystemRefVector & getParticleSystems()
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.
bool addRestoreListener(agxStream::RestoreListener *listener)
Add a restore listener to the Simulation.
const agxSDK::EventListener * getEventListener(const agx::Uuid &uuid) const
Find (linear search) and return the first event listener matching the uuid.
ConstraintEvent addConstraintEvent
Definition: Simulation.h:146
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:152
void writeStoragePermutations(agxStream::OutputArchive &archive) const
const agxWire::Wire * getWire(const agx::Name &name) const
Find and return the first matching named wire.
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::RigidBody * getRigidBody(const agx::Uuid &uuid)
Find (linear search) and return a pointer to a RigidBody with the given uuid.
agx::UInt getNumMergedBodies() const
agx::Constraint2DOF * getConstraint2DOF(const agx::Name &name)
Definition: Simulation.h:1597
agxWire::Wire * getWire(const agx::Name &name)
Find and return the first matching named wire.
MaterialEvent removeMaterialEvent
Definition: Simulation.h:150
const agxSDK::Assembly * getAssembly(const agx::Name &name) const
Find (linear search) and return named Assembly.
bool remove(agx::Material *material)
Remove a specified material from the simulation.
AssemblyPtrVector getAssemblyPtrVector() const
bool add(agx::Emitter *emitter, bool addGeometries=true)
Add an emitter to the Simulation.
agxData::EntityStorage * getEmitterStorage()
bool add(agxStream::Serializable *object)
Add an object as a serializable object.
agx::UInt8 getContactReductionBinResolution() const
void setEnableClearRenderTemporaries(bool enable)
agx::Emitter * getEmitter(const agx::Name &name)
Find (linear search) and return an emitter matching the given name.
const agx::RigidBodyPtrSetVector & getEnabledRigidBodies() const
agx::TaskGroup * getUpdateTask()
agxSDK::SimulationProxy * getSimulationProxy() const
Internal method.
SimulationSerializer * getSerializer()
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::MergedBody * getMergedBody(const agx::Name &name)
Find (linear search) and return named MergedBody.
agx::Event2< Simulation *, agx::ContactMaterial * > ContactMaterialEvent
Definition: Simulation.h:137
const SimulationStatisticsListener * getSimulationStatisticsListener() const
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 ...
An agxTerrain::TerrainToolInstance in a simulation, receiving step and contact callbacks in a control...
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
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:44
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:710
Specialization for constraints that have two degree of freedom such as Cylindrical.
Definition: Constraint.h:798
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:518
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
An event with two arguments.
Definition: Event.h:122
The class GravityField is responsible for calculating and applying a gravity force on a set of bodies...
Definition: GravityField.h:38
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition: HashVector.h:41
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:33
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:31
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:378
Structure holding several "normal" rigid bodies.
Definition: MergedBody.h:55
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:42
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:67
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
TaskGroup.
Definition: Task.h:585
A representation of a generic task.
Definition: Task.h:57
agx::Thread is a representation of an OS specific implementation of a computational thread.
Definition: Thread.h:199
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
Definition: Timer.h:62
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
Vector containing 'raw' data.
Definition: agx/Vector.h:246
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...
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: Space.h:63
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:123
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint16_t UInt16
Definition: Integer.h:31
uint32_t UInt32
Definition: Integer.h:32
uint64_t UInt
Definition: Integer.h:27
double Real
Definition: Real.h:41
uint8_t UInt8
Definition: Integer.h:30
agx::Real TimeStamp
Definition: TimeStamp.h:26
int16_t Int16
Definition: Integer.h:36