AGX Dynamics  2.37.2.0
SimulationProxy.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 #ifndef AGXSDK_SIMULATIONPROXY_H
18 #define AGXSDK_SIMULATIONPROXY_H
19 
20 #include <agx/Referenced.h>
21 
23 
24 namespace agxCollide
25 {
26  class Geometry;
27 }
28 
29 namespace agx
30 {
31  class RigidBody;
32  class Constraint;
33  class StrongInteraction;
34  class GravityField;
35 }
36 
37 namespace agxSDK
38 {
39  // Forward declarations.
40  class Simulation;
41  class MaterialManager;
42  class Assembly;
43  class EventListener;
44 
50  {
51  public:
52  virtual bool add( agxCollide::Geometry* geometry ) = 0;
53  virtual bool remove( agxCollide::Geometry* geometry ) = 0;
54  virtual void setEnable( agxCollide::Geometry* geometry, bool enable ) = 0;
55  virtual void addGroup( agxCollide::Geometry* geometry, agx::UInt32 id ) = 0;
56  virtual void addGroup( agxCollide::Geometry* geometry, const agx::Name& name ) = 0;
57  virtual void removeGroup( agxCollide::Geometry* geometry, agx::UInt32 id ) = 0;
58  virtual void removeGroup( agxCollide::Geometry* geometry, const agx::Name& name ) = 0;
59 
60  virtual bool add( agx::RigidBody* body, bool addGeometries = true ) = 0;
61  virtual bool remove( agx::RigidBody* body, bool removeGeometries = true ) = 0;
62  virtual void setEnable( agx::RigidBody* body, bool enable ) = 0;
63 
64  virtual bool add( agx::Constraint* c ) = 0;
65  virtual bool remove( agx::Constraint* c ) = 0;
66 
67  virtual bool add( agx::StrongInteraction* si ) = 0;
68  virtual bool remove( agx::StrongInteraction* si ) = 0;
69 
70  virtual bool add( agxSDK::Assembly* assembly ) = 0;
71  virtual bool remove( agxSDK::Assembly* assembly ) = 0;
72 
73  virtual bool add( agxSDK::EventListener* listener ) = 0;
74  virtual bool remove( agxSDK::EventListener* listener) = 0;
75 
76  virtual void addGeometryContacts( const agxCollide::LocalGeometryContactVector& contacts ) = 0;
77 
78  virtual void transferToDefaultStorage( agx::ContactMaterial* material ) = 0;
79  virtual void transferToSimulationStorage( agx::ContactMaterial* material ) = 0;
80 
81  virtual bool empty() const = 0;
82 
83  virtual bool getRunningParallel() const = 0;
84 
85  virtual void preParallelRun() = 0;
86  virtual void postParallelRun() = 0;
87  virtual void commit( agxSDK::Simulation* simulation ) = 0;
88 
89  virtual agx::Real getTimeStep() const = 0;
90 
91  virtual const agx::GravityField* getGravityField() const = 0;
92 
93  virtual const agxSDK::MaterialManager* getMaterialManager() const = 0;
94 
95  virtual const agxSDK::Simulation* getSimulation() const = 0;
96 
97  virtual void setSimulation( agxSDK::Simulation* simulation ) = 0;
98  virtual agxSDK::Simulation* getSimulationUnsafe() const = 0;
99  };
100 
102 }
103 
104 #endif
This class store the combine material properties between two agx::Material&#39;s.
Definition: Material.h:515
agx::ref_ptr< SimulationProxy > SimulationProxyRef
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
#define AGXPHYSICS_EXPORT
The base class for a constraint.
Definition: Constraint.h:88
Representation of a name string.
Definition: Name.h:32
Base class providing referencing counted objects.
Definition: Referenced.h:119
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
An EventListener can be associated to a Simulation and triggered upon various events.
Definition: EventListener.h:40
Simulation unique manager that handles logics around and parameters in contact materials given two ag...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
The class GravityField is responsible for calculating and applying a gravity force on a set of bodies...
Definition: GravityField.h:38
Interface class used by internal objects running in parallel.
double Real
Definition: Real.h:42
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
uint32_t UInt32
Definition: Integer.h:40
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Definition: Assembly.h:66