17 #ifndef GZ_RENDERING_BASE_BASEGPURAYS_HH_
18 #define GZ_RENDERING_BASE_BASEGPURAYS_HH_
22 #include <gz/common/Event.hh>
23 #include <gz/common/Console.hh>
39 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
54 public:
virtual const float *Data()
const override;
57 public:
virtual void Copy(
float *_data)
override;
60 public:
virtual void SetClamp(
bool _enable)
override;
63 public:
virtual bool Clamp()
const override;
68 unsigned int _height,
unsigned int _depth,
75 public:
virtual void SetIsHorizontal(
const bool _horizontal)
override;
78 public:
virtual bool IsHorizontal()
const override;
82 public:
virtual void SetVFOV(
const math::Angle &_vfov);
88 public:
virtual double RayCountRatio()
const override;
91 public:
virtual double RangeCountRatio()
const override;
94 public:
virtual void SetRayCountRatio(
95 const double _rayCountRatio)
override;
101 public:
virtual void SetAngleMin(
double _angle)
override;
107 public:
virtual void SetAngleMax(
double _angle)
override;
110 public:
virtual void SetVerticalRayCount(
int _samples)
override;
113 public:
virtual void SetRayCount(
int _samples)
override;
116 public:
virtual int RayCount()
const override;
119 public:
virtual int RangeCount()
const override;
122 public:
virtual int VerticalRayCount()
const override;
125 public:
virtual int VerticalRangeCount()
const override;
131 public:
virtual void SetVerticalAngleMin(
const double _angle)
override;
137 public:
virtual void SetVerticalAngleMax(
const double _angle)
override;
140 public:
virtual unsigned int Channels()
const override;
143 public:
virtual void SetHorizontalResolution(
double _resolution)
override;
146 public:
virtual double HorizontalResolution()
const override;
149 public:
virtual void SetVerticalResolution(
double resolution)
override;
152 public:
virtual double VerticalResolution()
const override;
162 public:
bool clamping =
false;
165 protected:
double rayCountRatio = 0;
168 protected:
double rangeCountRatio = 0;
174 protected:
bool isHorizontal =
true;
177 protected:
double minAngle = 0;
180 protected:
double maxAngle = 0;
183 protected:
double vMinAngle = 0;
186 protected:
double vMaxAngle = 0;
189 protected:
int hSamples = 0;
192 protected:
int vSamples = 0;
195 protected:
double hResolution = 1;
198 protected:
double vResolution = 1;
201 protected:
unsigned int channels = 1u;
237 this->clamping = _enable;
241 this->dataMinVal = this->NearClipPlane();
242 this->dataMaxVal = this->FarClipPlane();
256 return this->clamping;
262 std::function<
void(
const float *,
unsigned int,
unsigned int,
272 this->isHorizontal = _horizontal;
279 return this->isHorizontal;
286 return this->rayCountRatio;
293 this->rayCountRatio = _rayCountRatio;
300 return this->rangeCountRatio;
321 return this->minAngle;
328 this->minAngle = _angle;
335 return this->maxAngle;
342 this->maxAngle = _angle;
349 return this->hSamples;
356 this->hSamples = _samples;
363 return static_cast<int>(this->RayCount() * this->hResolution);
370 return this->vSamples;
377 this->vSamples = _samples;
384 return static_cast<int>(this->VerticalRayCount() * this->vResolution);
391 return this->vMinAngle;
398 this->vMinAngle = _angle;
405 return this->vMaxAngle;
412 this->vMaxAngle = _angle;
419 return this->channels;
426 this->hResolution = std::abs(_resolution);
433 return this->hResolution;
440 this->vResolution = std::abs(_resolution);
447 return this->vResolution;