AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
SystemNodeProxy.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#pragma once
18
19namespace agxSensor
20{
25
33 : public agx::Referenced
35 {
36 public:
38
39 public:
44
50 virtual bool addNotification(SystemNodeProxy& proxy);
51
56 virtual void removeNotification(SystemNodeProxy& proxy);
57
63 virtual void onChildAdded(SystemNodeProxy& proxy, SystemNode& child);
64
70 virtual void onChildRemoved(SystemNodeProxy& proxy, SystemNode& child);
71
79 virtual bool onAdd(SystemNodeProxy& proxy, agx::Referenced& instance);
80
88 virtual bool onRemove(SystemNodeProxy& proxy, agx::Referenced& instance);
89
96 virtual void synchronize(SystemNodeProxy& proxy, const CallbackData& data);
97
105 virtual void execute(SystemNodeProxy& proxy, const CallbackData& data);
106
113 virtual void complete(SystemNodeProxy& proxy);
114
122 virtual void result(SystemNodeProxy& proxy, const CallbackData& data);
123
129 virtual void synchronizeGraphics(SystemNodeProxy& proxy, const agxRender::RenderManager& renderManager);
130
135 virtual void cleanup(SystemNodeProxy& proxy) = 0;
136
138
139 public:
141
143 };
144
151 {
152 public:
158
162 template <typename T>
163 bool implements() const;
164
169
174
176
177 public:
179
180 virtual bool addNotification() override;
181 virtual void removeNotification() override;
182 virtual void onChildAdded(SystemNode& child) override;
183 virtual void onChildRemoved(SystemNode& child) override;
184 virtual bool onAdd(agx::Referenced& instance) override;
185 virtual bool onRemove(agx::Referenced& instance) override;
186 virtual void synchronize(const CallbackData& data) override;
187 virtual void execute(const CallbackData& data) override;
188 virtual void complete() override;
189 virtual void result(const CallbackData& data) override;
190 virtual void synchronizeGraphics(const agxRender::RenderManager& renderManager) override;
191 virtual void cleanup() override;
192
194
196
197 private:
198 ISystemNodeProxyRef m_implementation;
199 };
200
201 template <typename T>
202 bool SystemNodeProxy::implements() const
203 {
204 return m_implementation->is<T>();
205 }
206}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
#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 AGXSENSOR_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: agx/Vector.h:34
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Interface for system node behavioral implementations intended to have multiple states/instances (Syst...
virtual void onChildAdded(SystemNodeProxy &proxy, SystemNode &child)
Called when child has been added to this parent.
virtual bool onRemove(SystemNodeProxy &proxy, agx::Referenced &instance)
Called when an object has been removed from the sensor environment.
virtual void removeNotification(SystemNodeProxy &proxy)
Called when this system node is being removed from a sensor environment.
virtual void execute(SystemNodeProxy &proxy, const CallbackData &data)
Execute this system, integrating it data.dt forward in time.
virtual void synchronize(SystemNodeProxy &proxy, const CallbackData &data)
Synchronization from the main thread.
virtual void complete(SystemNodeProxy &proxy)
Complete the execution of this system, finishing the integration forward in time.
virtual void synchronizeGraphics(SystemNodeProxy &proxy, const agxRender::RenderManager &renderManager)
At the very end of a step, synchronize any graphics related aspects of the system node.
virtual void result(SystemNodeProxy &proxy, const CallbackData &data)
If necessary assemble, and fetch results related to this system node after a step by data....
virtual void cleanup(SystemNodeProxy &proxy)=0
The sensor environment is being put down, clean everything.
virtual bool onAdd(SystemNodeProxy &proxy, agx::Referenced &instance)
Called when an object has been added to the sensor environment.
virtual void onChildRemoved(SystemNodeProxy &proxy, SystemNode &child)
Called when child has been removed from this parent.
virtual bool addNotification(SystemNodeProxy &proxy)
Called when this system node has been added to a sensor environment.
virtual SystemNodeProxyRef createProxy()=0
Proxy system node, representing an instance of an ISystemNodeProxy in the system graph.
ISystemNodeProxy * getImplementation()
SystemNodeProxy(ISystemNodeProxy *implementation)
Construct a system node proxy instance with the given implementation.
const ISystemNodeProxy * getImplementation() const
System node is a separate step/operation in an execution tree representing a sensor (or such) in a se...
Definition: SystemNode.h:44
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
Base class providing referencing counted objects.
Definition: Referenced.h:120
bool is() const
Subclass test.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.