IDS peak ICV v1.2.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
39 : public peak::common::detail::PointXd<float, 3>
40 , public detail::IPrintable<PointXYZ>
41{
42public:
43 constexpr PointXYZ() = default;
44
54 constexpr PointXYZ(float x, float y, float z)
55 : PointXd<float, 3>({ x, y, z })
56 {}
57
63 PEAK_COMMON_NO_DISCARD float GetZ() const
64 {
65 return PointXd<float, 3>::GetCoordinates().at(2);
66 }
67
68protected:
69 void Print(detail::CommaSeperatedStream& stream) const override
70 {
71 stream << GetX() << GetY() << GetZ();
72 }
73
74private:
75 friend peak::common::detail::BackendAccessor<PointXYZ>;
76
77 constexpr PointXYZ(peak_icv_point_xyz point) // NOLINT
78 : PointXYZ(point.x, point.y, point.z)
79 {}
80};
81
82
83} /* namespace icv */
84} /* 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.