AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
Interaction.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
20
21namespace agx
22{
23 class DynamicsSystem;
27
28
33 {
34 public:
39
44 void setName( const agx::Name& name );
45
49 const agx::Name& getName() const;
50
55 void setPropertyContainer( agx::PropertyContainer* propertyContainer );
56
61
66
71
76
77 public:
87 virtual void updateForce(agx::DynamicsSystem* dynamicsSystem);
88
89#ifndef SWIG
93 virtual void preSystemCallback( agx::DynamicsSystem* /*dynamicsSystem*/ ) {}
97 virtual void postSystemCallback( agx::DynamicsSystem* /*dynamicsSystem*/ ) {}
98#endif
99
101
102 protected:
106 virtual ~Interaction() {}
107
111 virtual void addNotification();
112
116 virtual void removeNotification();
117
118 friend class agxSDK::Simulation;
122 virtual void setSimulation( agxSDK::Simulation* simulation );
123
124 private:
125 mutable PropertyContainerRef m_propertyContainer;
126 Name m_name;
127 agxSDK::SimulationProxyRef m_simulationProxy;
128 };
129
130 inline void Interaction::updateForce(agx::DynamicsSystem* /*dynamicsSystem*/) {}
131
132}
#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...
Definition: Serializable.h:207
#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:131
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
The complete physical system with bodies, interactions, data layout, time stepper,...
The base class for interactions.
Definition: Interaction.h:33
void setName(const agx::Name &name)
Name this interaction.
virtual ~Interaction()
Reference counted object, protected destructor.
Definition: Interaction.h:106
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:93
virtual void postSystemCallback(agx::DynamicsSystem *)
Called after all post step events, after solve.
Definition: Interaction.h:97
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...
Definition: Interaction.h:130
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
Templated vector class.
Definition: agx/Vector.h:53
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:40
agx::SetVector< InteractionRef > InteractionRefSetVector
agx::Vector< agx::InteractionRef > InteractionRefVector
Definition: Interaction.h:26