IDS peak ICV v1.1.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
33 : public PointXYZ
34 , public detail::IPrintable<PointXYZI>
35{
36public:
37 constexpr PointXYZI() = default;
38
48 constexpr PointXYZI(float x, float y, float z, uint16_t intensity)
49 : PointXYZ{ x, y, z }
50 , m_intensity{ intensity }
51 {}
52
58 PEAK_COMMON_NO_DISCARD constexpr uint16_t GetIntensity() const
59 {
60 return m_intensity;
61 }
62
68 constexpr bool operator==(const PointXYZI& rhs) const
69 {
70 return PointXYZ::operator==(rhs) && m_intensity == rhs.m_intensity;
71 }
72
73protected:
74 void Print(detail::CommaSeperatedStream& stream) const override
75 {
76 stream << GetX() << GetY() << GetZ() << GetIntensity();
77 }
78
79private:
80 friend peak::common::detail::BackendAccessor<PointXYZI>;
81
82 constexpr PointXYZI(peak_icv_point_xyzi point) // NOLINT
83 : PointXYZI(point.x, point.y, point.z, point.intensity)
84 {}
85
86 uint16_t m_intensity{};
87};
88} /* namespace icv */
89} /* 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.