AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
ISensorEnvironment.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
19#include <agx/Referenced.h>
20
22
23namespace agxRender
24{
25 class RenderManager;
26}
27
28namespace agxSDK
29{
30 class Simulation;
31
47 {
48 public:
52 ISensorEnvironment() = default;
53
57 virtual ~ISensorEnvironment() = default;
58
63 const Simulation* getSimulation() const;
64
65 public:
71 virtual void addNotification() = 0;
72
77 virtual void removeNotification() = 0;
78
85 virtual void step( agx::Real dt ) = 0;
86
91 virtual void fetchStepResults() = 0;
92
97 virtual void updateGraphics( const agxRender::RenderManager& renderManager ) = 0;
98
100
101 public:
103
104 private:
105 ISensorEnvironment( const ISensorEnvironment& ) = delete;
107 ISensorEnvironment& operator= ( const ISensorEnvironment& ) = delete;
108
109 private:
110 friend class Simulation;
111
112 void setSimulation( Simulation* simulation );
113
115
116 private:
117 agx::observer_ptr<agx::Referenced> m_simulation;
118 };
119}
#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 AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Interface to a cooperative sensor simulation assumed to be executed in a separate thread spawned in a...
virtual void removeNotification()=0
Called when removed from a simulation or explicitly called when the sensor simulation should stop/joi...
const Simulation * getSimulation() const
ISensorEnvironment()=default
Default constructor.
virtual ~ISensorEnvironment()=default
Destructor.
virtual void updateGraphics(const agxRender::RenderManager &renderManager)=0
Update the graphical components of the sensor environment.
virtual void addNotification()=0
Called when added to a simulation or explicitly called when the sensor simulation should start.
virtual void step(agx::Real dt)=0
Start the sensor simulation and step for delta time dt.
virtual void fetchStepResults()=0
Block main thread until the sensor simulation is done and the data/results/outputs are accessible.
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
Base class providing referencing counted objects.
Definition: Referenced.h:120
#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 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.
double Real
Definition: Real.h:41