AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Interaction.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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
20
21namespace agx
22{
23 class DynamicsSystem;
26
27
32 {
33 public:
38
43 void setName( const agx::Name& name );
44
48 const agx::Name& getName() const;
49
54 void setPropertyContainer( agx::PropertyContainer* propertyContainer );
55
60
65
70
75
76 public:
86 virtual void updateForce(agx::DynamicsSystem* dynamicsSystem);
87
88#ifndef SWIG
92 virtual void preSystemCallback( agx::DynamicsSystem* /*dynamicsSystem*/ ) {}
96 virtual void postSystemCallback( agx::DynamicsSystem* /*dynamicsSystem*/ ) {}
97#endif
98
100
101 protected:
105 virtual ~Interaction() {}
106
110 virtual void addNotification();
111
115 virtual void removeNotification();
116
117 friend class agxSDK::Simulation;
121 virtual void setSimulation( agxSDK::Simulation* simulation );
122
123 private:
124 mutable PropertyContainerRef m_propertyContainer;
125 Name m_name;
126 agxSDK::SimulationProxyRef m_simulationProxy;
127 };
128
129 inline void Interaction::updateForce(agx::DynamicsSystem* /*dynamicsSystem*/) {}
130
131}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
Interface class used by internal objects running in parallel.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
The complete physical system with bodies, interactions, data layout, time stepper,...
The base class for interactions.
Definition Interaction.h:32
void setName(const agx::Name &name)
Name this interaction.
virtual ~Interaction()
Reference counted object, protected destructor.
void setPropertyContainer(agx::PropertyContainer *propertyContainer)
Assign a new property container.
virtual void setSimulation(agxSDK::Simulation *simulation)
Assign simulation.
agx::Bool hasPropertyContainer() const
Interaction()
Default constructor.
agx::PropertyContainer * getPropertyContainer()
virtual void removeNotification()
Called when removed from a simulation.
virtual void preSystemCallback(agx::DynamicsSystem *)
Called after all pre step events, before solve.
Definition Interaction.h:92
virtual void postSystemCallback(agx::DynamicsSystem *)
Called after all post step events, after solve.
Definition Interaction.h:96
agxSDK::SimulationProxy * getSimulationProxy() const
const agx::Name & getName() const
const agx::PropertyContainer * getPropertyContainer() const
virtual void addNotification()
Called when added to a simulation.
virtual void updateForce(agx::DynamicsSystem *dynamicsSystem)
This virtual method is implemented so that it computes the interaction forces on all the physical bod...
Representation of a name string.
Definition Name.h:33
Class that is a container of named properties.
Definition Property.h:129
Base class providing referencing counted objects.
Definition Referenced.h:120
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition SetVector.h:38
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
agx::SetVector< InteractionRef > InteractionRefSetVector