7 #include "point_3d.hpp" 8 #include "point_3d_h.hpp" 16 using IsPolygonPoint =
27 template<
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));
auto cbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:144
const T & At(std::size_t index) const
Gets the point ata given index.
Definition: polygon_3d.hpp:104
Polygon3D(const T(&list)[N]) noexcept
Construct a polygon with an initializer list.
Definition: polygon_3d.hpp:81
auto crbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:224
auto rbegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:234
auto CBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:124
auto End() const noexcept
Iterator access.
Definition: polygon_3d.hpp:174
auto crend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:264
auto Begin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:134
auto CEnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:164
auto cend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:184
Root namespace for the Image Manager interface.
Definition: version.hpp:11
std::size_t NumPoints() const noexcept
Gets the number of points in this polygon.
Definition: polygon_3d.hpp:114
A polygon in 3D space.
Definition: polygon_3d.hpp:28
auto end() const noexcept
Iterator access.
Definition: polygon_3d.hpp:194
bool operator==(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:285
bool operator!=(const Polygon3D< T > &polygon) const noexcept
Compares to an other polygon.
Definition: polygon_3d.hpp:297
auto RBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:214
auto rend() const noexcept
Iterator access.
Definition: polygon_3d.hpp:274
const T & operator[](std::size_t index) const noexcept
Gets the point at a given index.
Definition: polygon_3d.hpp:93
Polygon3D(std::vector< T > &&points)
Construct a polygon from a vector.
Definition: polygon_3d.hpp:57
Polygon3D(const std::vector< T > &points) noexcept
Construct a polygon from a vector.
Definition: polygon_3d.hpp:70
auto CRBegin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:204
auto REnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:254
auto begin() const noexcept
Iterator access.
Definition: polygon_3d.hpp:154
auto CREnd() const noexcept
Iterator access.
Definition: polygon_3d.hpp:244