21 template <
class T,
class ENABLE =
void>
30 class Point3DC<T, typename EnableIfArithmetic<T>::type> final
80 :
Point3DC(point3d.X(), point3d.Y(), point3d.Z())
89 template <std::
size_t N>
92 static_assert(N == 4,
"CVB: Point3DC must have 4 elements");
101 T
X() const noexcept {
…}
121 T
Y() const noexcept {
…}
141 T
Z() const noexcept {
…}
183 return sqrt(x_ * x_ + y_ * y_ + z_ * z_);
194 return (x_ == other.x_ && y_ == other.y_ && z_ == other.z_ && c_ == other.c_);
205 return !(*
this == other);
213 return Point3DC<C>(
static_cast<C
>(
X()),
static_cast<C
>(
Y()),
static_cast<C
>(
Z()),
static_cast<C
>(C()));
284 assert(index < 4 && index >= 0);
285 return *(&x_ + index);
296 assert(index < 4 && index >= 0);
297 return *(&x_ + index);
301 T x_ =
static_cast<T
>(0.0);
302 T y_ =
static_cast<T
>(0.0);
303 T z_ =
static_cast<T
>(0.0);
304 T c_ =
static_cast<T
>(1.0);
353 return lhs.
X() * rhs.
X() + lhs.
Y() * rhs.
Y() + lhs.
Z() * rhs.
Z();
Multi-purpose 3D vector class with confidence.
Definition point_3d_c.hpp:23
Point3DC() noexcept=default
Creates a default point at (0, 0).
const T & operator[](int index) const noexcept
Index based element access.
Definition point_3d_c.hpp:282
Point3DC(Point3D< T > point3d) noexcept
Create a 3D point with confidence from a point.
Definition point_3d_c.hpp:79
Point3DC< T > & operator+=(const Point3DC< T > &point) noexcept
Adds and assigns to this point.
Definition point_3d_c.hpp:222
T X() const noexcept
Gets the x-component of the point.
Definition point_3d_c.hpp:101
T Y() const noexcept
Gets the y-component of the point.
Definition point_3d_c.hpp:121
void SetX(T x) noexcept
Sets the x-component of the point.
Definition point_3d_c.hpp:111
Point3DC(const T(&list)[N]) noexcept
Construct a point with an initializer list.
Definition point_3d_c.hpp:90
void SetY(T y)
Sets the y-component of the point.
Definition point_3d_c.hpp:131
Point3DC< T > & operator/=(const T &value) noexcept
Divide by a scalar and assigns to this point.
Definition point_3d_c.hpp:268
bool operator!=(const Point3DC< T > &other) const noexcept
Compares to an other point.
Definition point_3d_c.hpp:203
Point3DC< T > operator+(const Point3DC< T > &lhs, const Point3DC< T > &rhs)
Add two points.
Definition point_3d_c.hpp:317
Point3DC< T > & operator-=(const Point3DC< T > &point) noexcept
Subtracts and assigns to this point.
Definition point_3d_c.hpp:238
T Z() const noexcept
Gets the z-component of the point.
Definition point_3d_c.hpp:141
void SetConfidence(T c)
Sets confidence of the point.
Definition point_3d_c.hpp:171
Point3DC(T x, T y, T z, T c) noexcept
Create a point from the x-, y-, z- component and confidence.
Definition point_3d_c.hpp:66
Point3DC< T > & operator*=(const T &value) noexcept
Multiplies by a scalar and assigns to this point.
Definition point_3d_c.hpp:254
Point3DC< T > operator/(const Point3DC< T > &lhs, const T &rhs)
Divide point by scalar.
Definition point_3d_c.hpp:398
Point3DC< T > operator*(const Point3DC< T > &lhs, const T &rhs)
Multiply point with scalar.
Definition point_3d_c.hpp:366
T Confidence() const noexcept
Gets confidence of the point.
Definition point_3d_c.hpp:161
T Length() const noexcept
Gets the length of this point.
Definition point_3d_c.hpp:181
Point3DC< T > operator-(const Point3DC< T > &lhs, const Point3DC< T > &rhs)
Subtracts two points.
Definition point_3d_c.hpp:334
bool operator==(const Point3DC< T > &other) const noexcept
Compares to an other point.
Definition point_3d_c.hpp:192
T & operator[](int index) noexcept
Index based element access.
Definition point_3d_c.hpp:294
void SetZ(T z)
Sets the z-component of the point.
Definition point_3d_c.hpp:151
T operator*(const Point3DC< T > &lhs, const Point3DC< T > &rhs)
Inner product of two point vectors.
Definition point_3d_c.hpp:351
Multi-purpose 3D vector class.
Definition point_3d.hpp:22
Point3DC< T > operator*(const T &lhs, const Point3DC< T > &rhs)
Multiply scalar with point.
Definition point_3d_c.hpp:383
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
Point3DC< T > Vector3DC
Alias for Point3D.
Definition point_3d_c.hpp:407