AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
SensorGroupStepStride.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
17#include <agxSensor/Sensor.h>
18
19#include <array>
20
21namespace agxSensor
22{
25
35 {
36 public:
43 SensorRefVector sensors = SensorRefVector() );
44
49 void setStride( agx::UInt32 stride );
50
55
61 bool add( Sensor* sensor );
62
68 bool remove( Sensor* sensor );
69
73 virtual void cleanup() override;
74
76
77 public:
79
80 protected:
81 void invoke( const CallbackEvent& callbackEvent ) override;
82
84
85 private:
86 struct AccumulatedStep
87 {
88 agx::UInt32 step;
89 CallbackData data;
90 };
91
92 private:
93 agx::UInt32 m_stride;
94 std::array<AccumulatedStep, CallbackEvent::CLEANUP + 1> m_accumulatedSteps;
95 };
96}
#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 AGXSENSOR_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: agx/Vector.h:34
A group of sensors that steps at a lower rate compared to the environment, specified by the stride va...
bool remove(Sensor *sensor)
Remove sensor from this group.
virtual void cleanup() override
The sensor environment is being put down, clean everything.
bool add(Sensor *sensor)
Add unique sensor to this group.
SensorGroupStepStride(agx::UInt32 stride=1, SensorRefVector sensors=SensorRefVector())
Construct a step stride sensor group with the given stride.
agx::UInt32 getStride() const
void setStride(agx::UInt32 stride)
Set the group step stride compared to the environment.
Common base type for all sensors sharing the same general agxSensor layout.
Definition: Sensor.h:29
System node is a separate step/operation in an execution tree representing a sensor (or such) in a se...
Definition: SystemNode.h:44
Templated vector class.
Definition: agx/Vector.h:53
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
uint32_t UInt32
Definition: Integer.h:32