AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
CameraCMOSSensor.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
20
21#include <optional>
22
23namespace agxSensor
24{
25 using OptionalExposureCompensation = std::optional<agx::Real>;
26 using OptionalDynamicRange = std::optional<agx::Real>;
27
29 {
30 };
31
33
38 {
39 public:
49 const agx::Vec2& size = agx::Vec2(2728.8e-6, 1549.8e-6), const agx::Vec2i& resolution = agx::Vec2i(1920, 1080),
50 agx::Real iso = 100, agx::Real shutterSpeed = 5.6e-3, agx::Real dynamicRange = 11.3);
51
61 CameraCMOSSensorManualExposureFlag, const agx::Vec2& size = agx::Vec2(2728.8e-6, 1549.8e-6),
62 const agx::Vec2i& resolution = agx::Vec2i(1920, 1080), agx::Real iso = 100, agx::Real shutterSpeed = 5.6e-3,
63 agx::Real exposureCompensation = 0.0);
64
69 void setSize(const agx::Vec2& size);
70
75
80 void setResolution(const agx::Vec2i& resolution);
81
86
91 void setISO(agx::Real iso);
92
97
102 void setShutterSpeed(agx::Real shutterSpeed);
103
108
114 void setAutoExposure(agx::Real dynamicRange);
115
121 void setManualExposureCompensation(agx::Real exposureCompensation);
122
127
132
137
141 virtual agx::Vec2 getExtents() const override;
142
144
145 public:
146 virtual void synchronizeParameters(Camera* camera, const CameraBackend& backend) override;
147 virtual void resetSynchronizationState() override;
148
150
152
153 private:
154 CameraCMOSSensorParameters m_parameters;
155 LazyTrigger m_dirty;
156 };
157}
#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
A rectangular CMOS sensor for common digital cameras.
bool hasAutoExposureEnabled() const
agx::Real getISO() const
void setSize(const agx::Vec2 &size)
Set the sensor rectangular (physical) size.
void setShutterSpeed(agx::Real shutterSpeed)
Set the shutter speed of the sensor electronic shutter.
void setManualExposureCompensation(agx::Real exposureCompensation)
Set the exposure compensation value for manual exposure control.
agx::Real getShutterSpeed() const
void setResolution(const agx::Vec2i &resolution)
Set the sensor resolution.
CameraCMOSSensor(const agx::Vec2 &size=agx::Vec2(2728.8e-6, 1549.8e-6), const agx::Vec2i &resolution=agx::Vec2i(1920, 1080), agx::Real iso=100, agx::Real shutterSpeed=5.6e-3, agx::Real dynamicRange=11.3)
Constructs a CMOS digital camera sensor with auto-exposure.
agx::Vec2i getResolution() const
agx::Vec2 getSize() const
OptionalDynamicRange getDynamicRange() const
CameraCMOSSensor(CameraCMOSSensorManualExposureFlag, const agx::Vec2 &size=agx::Vec2(2728.8e-6, 1549.8e-6), const agx::Vec2i &resolution=agx::Vec2i(1920, 1080), agx::Real iso=100, agx::Real shutterSpeed=5.6e-3, agx::Real exposureCompensation=0.0)
Constructs a CMOS digital camera sensor with manual exposure control.
virtual agx::Vec2 getExtents() const override
OptionalExposureCompensation getExposureCompensation() const
void setAutoExposure(agx::Real dynamicRange)
Set the sensor to use automatic exposure control.
void setISO(agx::Real iso)
Set the amplifier ISO value for the sensor.
Base type for a photodetector (digital sensor or film) attached to a camera.
Camera instance class defined by a frame/transform and a model.
Type for triggering effects at a later point in time.
Definition: LazyTrigger.h:28
#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...
std::optional< agx::Real > OptionalDynamicRange
std::optional< agx::Real > OptionalExposureCompensation
double Real
Definition: Real.h:41