8#include "point_3d_h.hpp"
27template<
class T,
class ENABLE =
void>
60 : points_(std::move(points))
82 template<std::
size_t N>
85 static_assert(N >= 3,
"CVB: Poligon3D must have at least three points");
97 return points_[index];
108 return points_.at(index);
118 return points_.size();
128 return points_.cbegin();
168 return points_.cend();
208 return points_.crbegin();
248 return points_.crend();
289 return points_ == polygon.points_;
301 return !(*
this == polygon);
309 points.reserve(points_.size());
310 for (
const auto& point : points_)
311 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:136
auto CREnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:246
auto end() const noexcept
Iterator access.
Definition: polygon_3d.hpp:196
Polygon3D(const std::vector< T > &points) noexcept
Construct a polygon from a vector.
Definition: polygon_3d.hpp:72
auto rbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:236
auto REnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:256
auto cend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:186
const T & At(std::size_t index) const
Gets the point ata given index.
Definition: polygon_3d.hpp:106
auto CRBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:206
const T & operator[](std::size_t index) const noexcept
Gets the point at a given index.
Definition: polygon_3d.hpp:95
auto crend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:266
auto crbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:226
auto begin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:156
auto RBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:216
bool operator!=(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:299
Polygon3D(const T(&list)[N]) noexcept
Construct a polygon with an initializer list.
Definition: polygon_3d.hpp:83
bool operator==(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:287
auto CBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:126
auto End() const noexcept
Iterator access.
Definition: polygon_3d.hpp:176
Polygon3D(std::vector< T > &&points)
Construct a polygon from a vector.
Definition: polygon_3d.hpp:59
std::size_t NumPoints() const noexcept
Gets the number of points in this polygon.
Definition: polygon_3d.hpp:116
auto rend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:276
auto CEnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:166
auto cbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:146
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24