API Documentation
Loading...
Searching...
No Matches
Polyline< t_dims, t_type, t_vertex > Class Template Reference

A polyline which stores vertex information for many points along a given path. More...

#include <PolyLine.hpp>

Public Member Functions

void add (const t_vertex &vertex)
 
void add (uint04 index, const t_vertex &vertex)
 
void addAndSimplify (const t_vertex &vertex)
 
void addAndSimplify (uint04 index, const t_vertex &vertex)
 
template<uint01 t_new_dims, class t_new_type , class t_new_vertex_type = Vertex<t_new_dims, t_new_type>>
Polyline< t_dims, t_new_type, t_new_vertex_type > as () const
 
decltype(auto) begin ()
 
decltype(auto) begin () const
 
decltype(auto) begin (uint04 index)
 
decltype(auto) begin (uint04 index) const
 
Bounds< t_dims, t_type, t_vertex > bounds () const
 
Buffer< Polyline< t_dims, t_type >, uint04, ObjectAllocator< false > > breakIntoPolylinesByLength (t_type max_distance) const
 
Polyline< t_dims, t_type > breakIntoSegmentsByDistance (t_type d) const
 
Polyline< t_dims, t_type > breakIntoSegmentsByLength (t_type length) const
 
void clear ()
 
Polyline< t_dims, t_type > clipPolyline (const Bounds< t_vertex::NumberOfDimensions(), t_type > &bounds) const
 
decltype(auto) end ()
 
decltype(auto) end () const
 
const t_vertex & lastVertex () const
 
template<class t_precision >
t_precision length () const
 
Polylineoperator= (const Polyline &polygon)
 
Polylineoperator= (Polyline &&polygon) noexcept
 
bool operator== (const Polyline &polygon) const
 
template<class t_inter_type >
constexpr t_vertex pointAt (t_inter_type value) const
 
constexpr t_vertex pointAtLength (fltp08 value) const
 
 Polyline (Buffer< t_vertex > &vertices)
 
 Polyline (const Polyline &polygon) noexcept
 
 Polyline (Polyline &&polygon) noexcept
 
 Polyline (uint04 size=0)
 
void remove (uint04 index)
 
void removeLastVertex ()
 
void replace (uint04 index, const t_vertex &vertex)
 
LineSegment< t_dims, t_type, t_vertex > segment (uint04 index) const
 
uint04 segmentCount () const
 
void setVertices (const Buffer< t_vertex > &vertices)
 
void simplify ()
 
const t_vertex & vertex (uint04 index) const
 
uint04 vertexCount () const
 
const Buffer< t_vertex > & vertices () const
 

Detailed Description

template<uint01 t_dims, class t_type, class t_vertex>
class NDEVR::Polyline< t_dims, t_type, t_vertex >

A polyline which stores vertex information for many points along a given path.


Class: Polyline

Author: Tyler Parke

Date: 2017-11-19

Constructor & Destructor Documentation

◆ Polyline() [1/4]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline ( uint04 size = 0)
inline

◆ Polyline() [2/4]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline ( Buffer< t_vertex > & vertices)
inlineexplicit

◆ Polyline() [3/4]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline ( const Polyline< t_dims, t_type, t_vertex > & polygon)
inlinenoexcept

◆ Polyline() [4/4]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline ( Polyline< t_dims, t_type, t_vertex > && polygon)
inlinenoexcept

Member Function Documentation

◆ add() [1/2]

template<uint01 t_dims, class t_type , class t_vertex >
void add ( const t_vertex & vertex)
inline

Adds vertex.

Author: Tyler Parke

Date: 2017-11-19

Parameters: vertex - The vertex to add.

◆ add() [2/2]

template<uint01 t_dims, class t_type , class t_vertex >
void add ( uint04 index,
const t_vertex & vertex )
inline

Adds index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - Zero-based index of the. vertex - The vertex.

◆ addAndSimplify() [1/2]

template<uint01 t_dims, class t_type , class t_vertex >
void addAndSimplify ( const t_vertex & vertex)
inline

◆ addAndSimplify() [2/2]

template<uint01 t_dims, class t_type , class t_vertex >
void addAndSimplify ( uint04 index,
const t_vertex & vertex )
inline

◆ as()

template<uint01 t_dims, class t_type , class t_vertex >
template<uint01 t_new_dims, class t_new_type , class t_new_vertex_type = Vertex<t_new_dims, t_new_type>>
Polyline< t_dims, t_new_type, t_new_vertex_type > as ( ) const
inline

Gets as.

Author: Tyler Parke

Date: 2017-11-19

Returns
A Polyline<t_new_type,t_new_vertex_type>

◆ begin() [1/4]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) begin ( )
inline

◆ begin() [2/4]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) begin ( ) const
inline

◆ begin() [3/4]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) begin ( uint04 index)
inline

◆ begin() [4/4]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) begin ( uint04 index) const
inline

◆ bounds()

template<uint01 t_dims, class t_type , class t_vertex >
Bounds< t_dims, t_type, t_vertex > bounds ( ) const
inline

Gets the bounds.

Author: Tyler Parke

Date: 2017-11-19

Returns
A Bounds<t_dims,t_type,t_vertex>

◆ breakIntoPolylinesByLength()

template<uint01 t_dims, class t_type , class t_vertex >
Buffer< Polyline< t_dims, t_type >, uint04, ObjectAllocator< false > > breakIntoPolylinesByLength ( t_type max_distance) const
inline

◆ breakIntoSegmentsByDistance()

template<uint01 t_dims, class t_type , class t_vertex >
Polyline< t_dims, t_type > breakIntoSegmentsByDistance ( t_type d) const
inline

◆ breakIntoSegmentsByLength()

template<uint01 t_dims, class t_type , class t_vertex >
Polyline< t_dims, t_type > breakIntoSegmentsByLength ( t_type length) const
inline

◆ clear()

template<uint01 t_dims, class t_type , class t_vertex >
void clear ( )
inline

Clears this object to its blank/initial state.

Author: Tyler Parke

Date: 2017-11-19

◆ clipPolyline()

template<uint01 t_dims, class t_type , class t_vertex >
Polyline< t_dims, t_type > clipPolyline ( const Bounds< t_vertex::NumberOfDimensions(), t_type > & bounds) const
inline

◆ end() [1/2]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) end ( )
inline

◆ end() [2/2]

template<uint01 t_dims, class t_type , class t_vertex >
decltype(auto) end ( ) const
inline

◆ lastVertex()

template<uint01 t_dims, class t_type , class t_vertex >
const t_vertex & lastVertex ( ) const
inline

The last vertex in the polyline

Author: Tyler Parke

Date: 2019-01-12

Returns
The last vertex in the polyline

◆ length()

template<uint01 t_dims, class t_type , class t_vertex >
template<class t_precision >
t_precision length ( ) const
inline

Gets the length.

Author: Tyler Parke

Date: 2017-11-19

Returns
A t_type.

◆ operator=() [1/2]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline & operator= ( const Polyline< t_dims, t_type, t_vertex > & polygon)
inline

◆ operator=() [2/2]

template<uint01 t_dims, class t_type , class t_vertex >
Polyline & operator= ( Polyline< t_dims, t_type, t_vertex > && polygon)
inlinenoexcept

◆ operator==()

template<uint01 t_dims, class t_type , class t_vertex >
bool operator== ( const Polyline< t_dims, t_type, t_vertex > & polygon) const
inline

Equality operator.

Author: Tyler Parke

Date: 2017-11-19

Parameters: polygon - The polygon.

Returns
True if the parameters are considered equivalent.

◆ pointAt()

template<uint01 t_dims, class t_type , class t_vertex >
template<class t_inter_type >
t_vertex pointAt ( t_inter_type value) const
inlineconstexpr

Point at.

Author: Tyler Parke

Date: 2017-11-19

Parameters: value - The value.

Returns
A t_vertex.

◆ pointAtLength()

template<uint01 t_dims, class t_type , class t_vertex >
t_vertex pointAtLength ( fltp08 value) const
inlineconstexpr

◆ remove()

template<uint01 t_dims, class t_type , class t_vertex >
void remove ( uint04 index)
inline

Removes the given index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - The index to removeRows.

◆ removeLastVertex()

template<uint01 t_dims, class t_type , class t_vertex >
void removeLastVertex ( )
inline

Removes the last vertex from the polyline.

Author: Tyler Parke

Date: 2019-01-12

◆ replace()

template<uint01 t_dims, class t_type , class t_vertex >
void replace ( uint04 index,
const t_vertex & vertex )
inline

Replaces.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - Zero-based index of the. vector - The vector.

◆ segment()

template<uint01 t_dims, class t_type , class t_vertex >
LineSegment< t_dims, t_type, t_vertex > segment ( uint04 index) const
inline

Segments the given index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - Zero-based index of the.

Returns
A LineSegment<t_dims,t_type,t_vertex>

◆ segmentCount()

template<uint01 t_dims, class t_type , class t_vertex >
uint04 segmentCount ( ) const
inline

Segment count.

Author: Tyler Parke

Date: 2018-10-29

Returns
An uint04.

◆ setVertices()

template<uint01 t_dims, class t_type , class t_vertex >
void setVertices ( const Buffer< t_vertex > & vertices)
inline

Sets the vertices.

Author: Tyler Parke

Date: 2017-11-19

Parameters: vertices - The vertices.

◆ simplify()

template<uint01 t_dims, class t_type , class t_vertex >
void simplify ( )
inline

Removes all duplicate adjacent vertices.

Author: Tyler Parke

Date: 2019-01-12

◆ vertex()

template<uint01 t_dims, class t_type , class t_vertex >
const 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.

◆ vertexCount()

template<uint01 t_dims, class t_type , class t_vertex >
uint04 vertexCount ( ) const
inline

Vertex count.

Author: Tyler Parke

Date: 2017-11-19

Returns
An uint04.

◆ vertices()

template<uint01 t_dims, class t_type , class t_vertex >
const Buffer< t_vertex > & vertices ( ) const
inline

Gets the vertices.

Author: Tyler Parke

Date: 2017-11-19

Returns
A reference to a const Buffer<t_vertex>

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