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

template<class T, class ENABLE = void>
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]

template<class T, class ENABLE = void>
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]

template<class T, class ENABLE = void>
template<std::size_t N>
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()

template<class T, class ENABLE = void>
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()

template<class T, class ENABLE = void>
auto Begin ( ) const
inlinenoexcept

Iterator access.

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

◆ begin()

template<class T, class ENABLE = void>
auto begin ( ) const
inlinenoexcept

Iterator access.

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

◆ CBegin()

template<class T, class ENABLE = void>
auto CBegin ( ) const
inlinenoexcept

Iterator access.

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

◆ cbegin()

template<class T, class ENABLE = void>
auto cbegin ( ) const
inlinenoexcept

Iterator access.

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

◆ CEnd()

template<class T, class ENABLE = void>
auto CEnd ( ) const
inlinenoexcept

Iterator access.

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

◆ cend()

template<class T, class ENABLE = void>
auto cend ( ) const
inlinenoexcept

Iterator access.

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

◆ CRBegin()

template<class T, class ENABLE = void>
auto CRBegin ( ) const
inlinenoexcept

Iterator access.

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

◆ crbegin()

template<class T, class ENABLE = void>
auto crbegin ( ) const
inlinenoexcept

Iterator access.

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

◆ CREnd()

template<class T, class ENABLE = void>
auto CREnd ( ) const
inlinenoexcept

Iterator access.

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

◆ crend()

template<class T, class ENABLE = void>
auto crend ( ) const
inlinenoexcept

Iterator access.

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

◆ End()

template<class T, class ENABLE = void>
auto End ( ) const
inlinenoexcept

Iterator access.

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

◆ end()

template<class T, class ENABLE = void>
auto end ( ) const
inlinenoexcept

Iterator access.

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

◆ NumPoints()

template<class T, class ENABLE = void>
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!=()

template<class T, class ENABLE = void>
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==()

template<class T, class ENABLE = void>
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[]()

template<class T, class ENABLE = void>
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()

template<class T, class ENABLE = void>
auto RBegin ( ) const
inlinenoexcept

Iterator access.

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

◆ rbegin()

template<class T, class ENABLE = void>
auto rbegin ( ) const
inlinenoexcept

Iterator access.

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

◆ REnd()

template<class T, class ENABLE = void>
auto REnd ( ) const
inlinenoexcept

Iterator access.

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

◆ rend()

template<class T, class ENABLE = void>
auto rend ( ) const
inlinenoexcept

Iterator access.

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