8#include "point_3d_h.hpp"
27template<
class T,
class ENABLE =
void>
58 : points_(std::move(points))
80 template<std::
size_t N>
83 static_assert(N >= 3,
"CVB: Poligon3D must have at least three points");
95 return points_[index];
106 return points_.at(index);
116 return points_.size();
126 return points_.cbegin();
166 return points_.cend();
206 return points_.crbegin();
246 return points_.crend();
287 return points_ == polygon.points_;
299 return !(*
this == polygon);
307 points.reserve(points_.size());
308 for (
const auto& point : points_)
309 points.emplace_back(
static_cast<C
>(point));
A polygon in 3D space.
Definition: polygon_3d.hpp:29
auto Begin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:134
auto CREnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:244
auto end() const noexcept
Iterator access.
Definition: polygon_3d.hpp:194
Polygon3D(const std::vector< T > &points) noexcept
Construct a polygon from a vector.
Definition: polygon_3d.hpp:70
auto rbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:234
auto REnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:254
auto cend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:184
const T & At(std::size_t index) const
Gets the point ata given index.
Definition: polygon_3d.hpp:104
auto CRBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:204
const T & operator[](std::size_t index) const noexcept
Gets the point at a given index.
Definition: polygon_3d.hpp:93
auto crend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:264
auto crbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:224
auto begin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:154
auto RBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:214
bool operator!=(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:297
Polygon3D(const T(&list)[N]) noexcept
Construct a polygon with an initializer list.
Definition: polygon_3d.hpp:81
bool operator==(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:285
auto CBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:124
auto End() const noexcept
Iterator access.
Definition: polygon_3d.hpp:174
Polygon3D(std::vector< T > &&points)
Construct a polygon from a vector.
Definition: polygon_3d.hpp:57
std::size_t NumPoints() const noexcept
Gets the number of points in this polygon.
Definition: polygon_3d.hpp:114
auto rend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:274
auto CEnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:164
auto cbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:144
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24