IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
peak_icv_point_xyzi.hpp
Go to the documentation of this file.
1
11#pragma once
12
14#include <peak_common_c/detail/peak_common_defines.h>
17#include <vector>
18
19namespace peak
20{
21namespace icv
22{
23
32 : public PointXYZ
33 , public detail::IPrintable<PointXYZI>
34{
35public:
36 constexpr PointXYZI() = default;
37
47 constexpr PointXYZI(float x, float y, float z, uint16_t intensity)
48 : PointXYZ{ x, y, z }
49 , m_intensity{ intensity }
50 {}
51
57 PEAK_COMMON_NO_DISCARD constexpr uint16_t GetIntensity() const
58 {
59 return m_intensity;
60 }
61
67 constexpr bool operator==(const PointXYZI& rhs) const
68 {
69 return PointXYZ::operator==(rhs) && m_intensity == rhs.m_intensity;
70 }
71
72protected:
73 void Print(detail::CommaSeperatedStream& stream) const override
74 {
75 stream << GetX() << GetY() << GetZ() << GetIntensity();
76 }
77
78private:
79 friend peak::common::detail::BackendAccessor<PointXYZI>;
80
81 constexpr PointXYZI(peak_icv_point_xyzi point) // NOLINT
82 : PointXYZI(point.x, point.y, point.z, point.intensity)
83 {}
84
85 uint16_t m_intensity{};
86};
87} /* namespace icv */
88} /* namespace peak */
constexpr bool operator==(const PointXd< H, d > &rhs) const
A point consists of x, y and z coordinate.
float GetZ() const
Returns the z coordinate.
A point consists of x, y, z coordinates and intensity meta data.
constexpr PointXYZI()=default
constexpr bool operator==(const PointXYZI &rhs) const
constexpr PointXYZI(float x, float y, float z, uint16_t intensity)
Point constructor from x, y and z.
constexpr uint16_t GetIntensity() const
Returns the intensity meta data.