template<typename T>
recti::Polygon class

Polygon.

Template parameters
T

Polygon is a class template that represents an arbitrary polygon. It stores the origin point and a vector of edges that define the polygon. The template parameter T specifies the type of the coordinates of the points.

Constructors, destructors, conversion operators

Polygon(gsl::span<const Point<T>> pointset) explicit constexpr
Construct a new Polygon object.

Public functions

auto operator+=(const Vector2<T>& rhs) -> Polygon & -> auto constexpr
auto signed_area_x2() const -> T -> auto constexpr
auto lb() const -> Point< T > -> auto
auto ub() const -> Point< T > -> auto

Function documentation

template<typename T>
recti::Polygon<T>::Polygon(gsl::span<const Point<T>> pointset) explicit constexpr

Construct a new Polygon object.

Parameters
pointset in

template<typename T>
auto recti::Polygon<T>::operator+=(const Vector2<T>& rhs) -> Polygon & constexpr

Parameters
rhs in
Returns constexpr Point&

template<typename T>
auto recti::Polygon<T>::signed_area_x2() const -> T constexpr

Returns T

template<typename T>
auto recti::Polygon<T>::lb() const -> Point< T >

Returns Point<T>

template<typename T>
auto recti::Polygon<T>::ub() const -> Point< T >

Returns Point<T>