template<typename T>
recti::RPolygon class

Rectilinear Polygon.

Template parameters
T

RPolygon is a class template that represents a rectilinear 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

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

Public functions

auto operator+=(const Vector2<T>& vector) -> RPolygon & -> auto constexpr
auto signed_area() const -> T -> auto constexpr
template<typename U>
auto contains(const Point<U>& rhs) const -> bool -> auto
auto lb() const -> Point< T > -> auto
auto ub() const -> Point< T > -> auto

Function documentation

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

Construct a new RPolygon object.

Parameters
pointset in

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

Returns constexpr Point&

template<typename T>
auto recti::RPolygon<T>::signed_area() const -> T constexpr

Returns T

template<typename T> template<typename U>
auto recti::RPolygon<T>::contains(const Point<U>& rhs) const -> bool

Template parameters
U
Parameters
rhs in
Returns true

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

Returns Point<T>

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

Returns Point<T>