IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
peak_icv_point_xyz.hpp
Go to the documentation of this file.
1
11#pragma once
12
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
30namespace experimental
31{
41 : public peak::common::detail::PointXd<float, 3>
42 , public detail::IPrintable<PointXYZ>
43{
44public:
45 constexpr PointXYZ() = default;
46
56 constexpr PointXYZ(float x, float y, float z)
57 : PointXd<float, 3>({ x, y, z })
58 {}
59
65 PEAK_ICV_NO_DISCARD float GetZ() const
66 {
67 return PointXd<float, 3>::GetCoordinates().at(2);
68 }
69
70protected:
71 void Print(detail::CommaSeperatedStream& stream) const override
72 {
73 stream << GetX() << GetY() << GetZ();
74 }
75
76private:
77 friend peak::common::detail::BackendAccessor<PointXYZ>;
78
79 constexpr PointXYZ(peak_icv_point_xyz point) // NOLINT
80 : PointXYZ(point.x, point.y, point.z)
81 {}
82};
83
84} /* namespace experimental */
85
86} /* namespace icv */
87} /* 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.
float GetZ() const
Returns the z coordinate.