IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
peak_icv_point_xyz.hpp
Go to the documentation of this file.
1
11#pragma once
12
14#include <peak_common_c/detail/peak_common_defines.h>
18#include <peak_icv_c/types/peak_icv_simple_types.h>
19#include <array>
20#include <limits>
21#include <set>
22#include <sstream>
23#include <vector>
24
25namespace peak
26{
27namespace icv
28{
29
38 : public peak::common::detail::PointXd<float, 3>
39 , public detail::IPrintable<PointXYZ>
40{
41public:
42 constexpr PointXYZ() = default;
43
53 constexpr PointXYZ(float x, float y, float z)
54 : PointXd<float, 3>({ x, y, z })
55 {}
56
62 PEAK_COMMON_NO_DISCARD float GetZ() const
63 {
64 return PointXd<float, 3>::GetCoordinates().at(2);
65 }
66
67protected:
68 void Print(detail::CommaSeperatedStream& stream) const override
69 {
70 stream << GetX() << GetY() << GetZ();
71 }
72
73private:
74 friend peak::common::detail::BackendAccessor<PointXYZ>;
75
76 constexpr PointXYZ(peak_icv_point_xyz point) // NOLINT
77 : PointXYZ(point.x, point.y, point.z)
78 {}
79};
80
81
82} /* namespace icv */
83} /* namespace peak */
A point in space with configurable dimensionality and coordinate type.
A point consists of x, y and z coordinate.
constexpr PointXYZ(float x, float y, float z)
Point constructor from x, y and z.
constexpr PointXYZ()=default
float GetZ() const
Returns the z coordinate.