CVB++ 14.1
Polygon3D< T, ENABLE > Class Template Referencefinal

A polygon in 3D space. More...

#include <cvb/polygon_3d.hpp>

Public Member Functions

 Polygon3D (std::vector< T > &&points)
 Construct a polygon from a vector. More...
 
 Polygon3D (const std::vector< T > &points) noexcept
 Construct a polygon from a vector. More...
 
template<std::size_t N>
 Polygon3D (const T(&list)[N]) noexcept
 Construct a polygon with an initializer list. More...
 
const T & operator[] (std::size_t index) const noexcept
 Gets the point at a given index. More...
 
const T & At (std::size_t index) const
 Gets the point ata given index. More...
 
std::size_t NumPoints () const noexcept
 Gets the number of points in this polygon. More...
 
auto CBegin () const noexcept
 Iterator access. More...
 
auto Begin () const noexcept
 Iterator access. More...
 
auto cbegin () const noexcept
 Iterator access. More...
 
auto begin () const noexcept
 Iterator access. More...
 
auto CEnd () const noexcept
 Iterator access. More...
 
auto End () const noexcept
 Iterator access. More...
 
auto cend () const noexcept
 Iterator access. More...
 
auto end () const noexcept
 Iterator access. More...
 
auto CRBegin () const noexcept
 Iterator access. More...
 
auto RBegin () const noexcept
 Iterator access. More...
 
auto crbegin () const noexcept
 Iterator access. More...
 
auto rbegin () const noexcept
 Iterator access. More...
 
auto CREnd () const noexcept
 Iterator access. More...
 
auto REnd () const noexcept
 Iterator access. More...
 
auto crend () const noexcept
 Iterator access. More...
 
auto rend () const noexcept
 Iterator access. More...
 
bool operator== (const Polygon3D< T > &polygon) const noexcept
 Compares to an other polygon. More...
 
bool operator!= (const Polygon3D< T > &polygon) const noexcept
 Compares to an other polygon. More...
 
template<class C >
 operator Polygon3D< C > () const noexcept
 Enable casting.
 

Detailed Description

template<class T, class ENABLE = void>
class Cvb::Polygon3D< T, ENABLE >

A polygon in 3D space.

Constructor & Destructor Documentation

◆ Polygon3D() [1/3]

Polygon3D ( std::vector< T > &&  points)
inlineexplicit

Construct a polygon from a vector.

Parameters
[in]pointsVector to move.
Exceptions
Doesnot throw any exception.

◆ Polygon3D() [2/3]

Polygon3D ( const std::vector< T > &  points)
inlineexplicitnoexcept

Construct a polygon from a vector.

Parameters
[in]pointsVector to copy.
Exceptions
Doesnot throw any exception.

◆ Polygon3D() [3/3]

Polygon3D ( const T(&)  list[N])
inlinenoexcept

Construct a polygon with an initializer list.

Parameters
[in]listContaining at least 3 elements.
Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ At()

const T & At ( std::size_t  index) const
inline

Gets the point ata given index.

Parameters
[in]indexThe index.
Returns
A 3D point.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Begin()

auto Begin ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ begin()

auto begin ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ CBegin()

auto CBegin ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ cbegin()

auto cbegin ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ CEnd()

auto CEnd ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ cend()

auto cend ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ CRBegin()

auto CRBegin ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ crbegin()

auto crbegin ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ CREnd()

auto CREnd ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ crend()

auto crend ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ End()

auto End ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ end()

auto end ( ) const
inlinenoexcept

Iterator access.

Returns
An iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ NumPoints()

std::size_t NumPoints ( ) const
inlinenoexcept

Gets the number of points in this polygon.

Returns
The number f points.
Exceptions
Doesnot throw any exception.

◆ operator!=()

bool operator!= ( const Polygon3D< T > &  polygon) const
inlinenoexcept

Compares to an other polygon.

Parameters
[in]polygonOther polygon.
Returns
True if not equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ operator==()

bool operator== ( const Polygon3D< T > &  polygon) const
inlinenoexcept

Compares to an other polygon.

Parameters
[in]polygonOther polygon.
Returns
True if equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ operator[]()

const T & operator[] ( std::size_t  index) const
inlinenoexcept

Gets the point at a given index.

Parameters
[in]indexThe index.
Returns
A 3D point.
Exceptions
Doesnot throw any exception.

◆ RBegin()

auto RBegin ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ rbegin()

auto rbegin ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ REnd()

auto REnd ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.

◆ rend()

auto rend ( ) const
inlinenoexcept

Iterator access.

Returns
A reverse iterator for read only access.
Exceptions
Doesnot throw any exception.