AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
LinkedStructureComponent.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
19#include <agx/Referenced.h>
20
22
23namespace agxSDK
24{
25 class Simulation;
26 class LinkedStructure;
27
30
37 {
38 public:
43 const agx::Name& getName() const;
44
50 void setName( const agx::Name& name );
51
56
61
62 public:
64
65 protected:
66 // Callbacks and set simulation and linked structure.
67 friend class LinkedStructure;
68
73 virtual void onAddNotification( agxSDK::Simulation* simulation );
74
78 virtual void onAddNotification( agxSDK::LinkedStructure* linkedStructure );
79
84 virtual void onRemoveNotification( agxSDK::Simulation* simulation );
85
89 virtual void onRemoveNotification( agxSDK::LinkedStructure* linkedStructure );
90
94 virtual void onPreCollideStep();
95
99 virtual void onPreStep();
100
104 virtual void onPostStep();
105
109 virtual void onLastStep();
110
111 protected:
117
122
123 private:
129 void onAddToSimulation( agxSDK::Simulation* simulation );
130
135 void onRemoveFromSimulation( agxSDK::Simulation* simulation );
136
142 void setLinkedStructure( agxSDK::LinkedStructure* linkedStructure, agx::Bool silent = false );
144
145 private:
146 agx::Name m_name;
147 LinkedStructure* m_linkedStructure;
148 };
149}
#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
Base implementation of a component (e.g., specific functionality) in linked structures.
virtual void onPreStep()
Called on simulation pre step event - after user preStep.
agxSDK::LinkedStructure * getLinkedStructure() const
LinkedStructureComponent(const agx::Name &name="")
Default, protected constructor.
virtual void onLastStep()
Called on simulation last step event - after user lastStep.
const agx::Name & getName() const
virtual void onRemoveNotification(agxSDK::LinkedStructure *linkedStructure)
Called when this component is removed from a linked structure.
agxSDK::Simulation * getSimulation() const
virtual void onPreCollideStep()
Called on simulation pre-collide step event - after user preCollide.
virtual void onPostStep()
Called on simulation post step event - after user postStep.
virtual void onAddNotification(agxSDK::LinkedStructure *linkedStructure)
Called when this component is added to a linked structure.
void setName(const agx::Name &name)
Assign new name to this component.
virtual void onRemoveNotification(agxSDK::Simulation *simulation)
Called when removeNotification is executed when this linked structure is removed from the simulation.
virtual void onAddNotification(agxSDK::Simulation *simulation)
Called when addNotification is executed when this linked structure is added to the simulation.
virtual ~LinkedStructureComponent()
Reference counted object - protected destructor.
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
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...
Representation of a name string.
Definition Name.h:33
Base class providing referencing counted objects.
Definition Referenced.h:120
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.