AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
CameraOutputHandler.h
Go to the documentation of this file.
1/*
2Copyright 2007-2026. 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
19
20#include <optional>
21
22namespace agxSensor
23{
24 using OptionalUniqueId = std::optional<size_t>;
25
27
32 : public SystemNode
34 {
35 public:
40
47 bool add(size_t uniqueId, ICameraOutput* output);
48
56
62 ICameraOutput* get(size_t uniqueId);
63
69 ISensorOutput* getBase(size_t uniqueId) override;
70
74 void capture();
75
77
78 public:
79 virtual void result(const CallbackData& data) override;
80 virtual void synchronizeGraphics(const agxRender::RenderManager& renderManager) override;
81 virtual void cleanup() override;
82
84
85 protected:
86 using OutputTable = agx::HashTable<size_t, ICameraOutputRef>;
87
89
90 protected:
91 OutputTable m_outputs {};
92 };
93}
#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
Handler responsible for how the camera readings are assembled and provided to the user.
bool add(size_t uniqueId, ICameraOutput *output)
Add the given camera output to the output handler mapped to the given unique id.
void capture()
Tell the camera to capture a frame for all outputs.
ISensorOutput * getBase(size_t uniqueId) override
Access camera output instance given the unique id from when it was added.
CameraOutputHandler()=default
Default constructor.
ICameraOutput * get(size_t uniqueId)
Access camera output instance given the unique id from when it was added.
OptionalUniqueId add(ICameraOutput *output)
Add the given camera output to the output handler.
Common interface for camera outputs containing the basics that can be assumed about a frame-based cam...
Definition: CameraOutput.h:37
Common interface for sensor output handlers.
Common interface for sensor output data.
Definition: SensorOutput.h:27
System node is a separate step/operation in an execution tree representing a sensor (or such) in a se...
Definition: SystemNode.h:44
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...
std::optional< size_t > OptionalUniqueId
The agx namespace contains the dynamics/math part of the AGX Dynamics API.