NDEVR
API Documentation
Polygon< t_type, t_vertex >

An N-sided polygon. More...

Inheritance diagram for Polygon< t_type, t_vertex >:
[legend]

Public Member Functions

void add (const t_vertex &vertex)
Bounds< 2, t_type, t_vertex > bounds () const
LineSegment< 2, t_type, t_vertex > edge (uint04 index) const
uint04 edgeCount () const
void setVertices (const Buffer< t_vertex > &vertices)
const t_vertex & vertex (uint04 index) const
uint04 vertexCount () const
const Buffer< t_vertex > & vertices () const

Detailed Description

template<class t_type, class t_vertex = Vertex<2, t_type>>
class Polygon< t_type, t_vertex >

An N-sided polygon.


Class: Polygon

Author: Tyler Parke

Date: 2017-11-19

See also
Triangle, Polyline, ConcavePolygon

Definition at line 54 of file Polygon.hpp.

Member Function Documentation

◆ add()

template<class t_type, class t_vertex = Vertex<2, t_type>>
void Polygon< t_type, t_vertex >::add ( const t_vertex & vertex)
inline

Adds vertex.

Author: Tyler Parke

Date: 2017-11-19

Parameters: vertex - The vertex to add.

Definition at line 295 of file Polygon.hpp.

Referenced by Geometry::polygons().

◆ bounds()

template<class t_type, class t_vertex = Vertex<2, t_type>>
Bounds< 2, t_type, t_vertex > Polygon< t_type, t_vertex >::bounds ( ) const
inline

Gets the bounds.

Author: Tyler Parke

Date: 2017-11-19

Returns
A Bounds<2,t_type>

Definition at line 131 of file Polygon.hpp.

◆ edge()

template<class t_type, class t_vertex = Vertex<2, t_type>>
LineSegment< 2, t_type, t_vertex > Polygon< t_type, t_vertex >::edge ( uint04 index) const
inline

Edges the given index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - Zero-based index of the.

Returns
A LineSegment<2,t_type,t_vertex>

Definition at line 176 of file Polygon.hpp.

◆ edgeCount()

template<class t_type, class t_vertex = Vertex<2, t_type>>
uint04 Polygon< t_type, t_vertex >::edgeCount ( ) const
inline

Edge count.

Author: Tyler Parke

Date: 2017-11-19

Returns
An uint04.

Definition at line 221 of file Polygon.hpp.

◆ setVertices()

template<class t_type, class t_vertex = Vertex<2, t_type>>
void Polygon< t_type, t_vertex >::setVertices ( const Buffer< t_vertex > & vertices)
inline

Sets the vertices.

Author: Tyler Parke

Date: 2017-11-19

Parameters: vertices - The vertices.

Definition at line 274 of file Polygon.hpp.

◆ vertex()

template<class t_type, class t_vertex = Vertex<2, t_type>>
const t_vertex & Polygon< t_type, t_vertex >::vertex ( uint04 index) const
inline

Vertices the given index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - Zero-based index of the.

Returns
A reference to a const t_vertex.

Definition at line 158 of file Polygon.hpp.

Referenced by ConcavePolygon< t_type, t_vertex >::convexDecomp(), and edge().

◆ vertexCount()

template<class t_type, class t_vertex = Vertex<2, t_type>>
uint04 Polygon< t_type, t_vertex >::vertexCount ( ) const
inline

Vertex count.

Author: Tyler Parke

Date: 2017-11-19

Returns
An uint04.

Definition at line 206 of file Polygon.hpp.

Referenced by ConcavePolygon< t_type, t_vertex >::convexDecomp(), and Geometry::polygons().

◆ vertices()

template<class t_type, class t_vertex = Vertex<2, t_type>>
const Buffer< t_vertex > & Polygon< t_type, t_vertex >::vertices ( ) const
inline

Gets the vertices.

Author: Tyler Parke

Date: 2017-11-19

Returns
A reference to a const Buffer<t_vertex>

Definition at line 191 of file Polygon.hpp.


The documentation for this class was generated from the following file: