NDEVR
API Documentation
Polyline< t_dims, t_type, t_vertex >

A sequence of connected line segments defined by ordered vertices along a path. More...

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

Public Member Functions

void add (const t_vertex &vertex)
void add (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
Bounds< t_dims, t_type, t_vertex > bounds () const
void clear ()
const t_vertex & lastVertex () const
template<class t_precision>
t_precision length () const
bool operator== (const Polyline &polygon) const
template<class t_inter_type>
constexpr t_vertex pointAt (t_inter_type value) const
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 = Vertex<t_dims, t_type>>
class Polyline< t_dims, t_type, t_vertex >

A sequence of connected line segments defined by ordered vertices along a path.


Class: Polyline

Author: Tyler Parke

Date: 2017-11-19

See also
LineSegment, Vertex, Polygon

Definition at line 54 of file PolyLine.hpp.

Member Function Documentation

◆ add() [1/2]

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, 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 244 of file PolyLine.hpp.

References vertex().

Referenced by as(), Extruder::ExtrudeRealThickness(), operator*(), and Geometry::polylines().

◆ add() [2/2]

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, t_type, t_vertex >::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.

Definition at line 266 of file PolyLine.hpp.

References vertex().

◆ as()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
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 > Polyline< t_dims, t_type, t_vertex >::as ( ) const
inline

Gets as.

Author: Tyler Parke

Date: 2017-11-19

Returns
A Polyline<t_new_type,t_new_vertex_type>

Definition at line 415 of file PolyLine.hpp.

References add(), as(), vertex(), and vertexCount().

Referenced by as().

◆ bounds()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
Bounds< t_dims, t_type, t_vertex > Polyline< 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>

Definition at line 93 of file PolyLine.hpp.

References IsInvalid().

◆ clear()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, t_type, t_vertex >::clear ( )
inline

Clears this object to its blank/initial state.

Author: Tyler Parke

Date: 2017-11-19

Definition at line 399 of file PolyLine.hpp.

Referenced by Geometry::polylines().

◆ lastVertex()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
const t_vertex & Polyline< t_dims, t_type, 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

Definition at line 350 of file PolyLine.hpp.

◆ length()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
template<class t_precision>
t_precision Polyline< t_dims, t_type, t_vertex >::length ( ) const
inline

Gets the length.

Author: Tyler Parke

Date: 2017-11-19

Returns
A t_type.

Definition at line 435 of file PolyLine.hpp.

References cast(), IsInvalid(), IsValid(), length(), segment(), segmentCount(), and vertexCount().

Referenced by length().

◆ operator==()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
bool Polyline< t_dims, t_type, t_vertex >::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.

Definition at line 509 of file PolyLine.hpp.

◆ pointAt()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
template<class t_inter_type>
t_vertex Polyline< t_dims, t_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.

Definition at line 470 of file PolyLine.hpp.

References cast(), and segment().

◆ remove()

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

Removes the given index.

Author: Tyler Parke

Date: 2017-11-19

Parameters: index - The index to removeRows.

Definition at line 335 of file PolyLine.hpp.

Referenced by simplify().

◆ removeLastVertex()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, t_type, t_vertex >::removeLastVertex ( )
inline

Removes the last vertex from the polyline.

Author: Tyler Parke

Date: 2019-01-12

Definition at line 362 of file PolyLine.hpp.

◆ replace()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, t_type, t_vertex >::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.

Definition at line 315 of file PolyLine.hpp.

References vertex().

◆ segment()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
LineSegment< t_dims, t_type, t_vertex > Polyline< 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>

Definition at line 164 of file PolyLine.hpp.

References vertex().

Referenced by Extruder::Extrude(), length(), pointAt(), and simplify().

◆ segmentCount()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
uint04 Polyline< t_dims, t_type, t_vertex >::segmentCount ( ) const
inline

Segment count.

Author: Tyler Parke

Date: 2018-10-29

Returns
An uint04.

Definition at line 209 of file PolyLine.hpp.

Referenced by Extruder::Extrude(), and length().

◆ setVertices()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, 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 228 of file PolyLine.hpp.

References vertices().

◆ simplify()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
void Polyline< t_dims, t_type, t_vertex >::simplify ( )
inline

Removes all duplicate adjacent vertices.

Author: Tyler Parke

Date: 2019-01-12

Definition at line 373 of file PolyLine.hpp.

References remove(), segment(), vertex(), and vertexCount().

◆ vertex()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
const t_vertex & Polyline< t_dims, 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 146 of file PolyLine.hpp.

Referenced by add(), add(), as(), Extruder::Extrude(), operator*(), replace(), segment(), and simplify().

◆ vertexCount()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
uint04 Polyline< t_dims, t_type, t_vertex >::vertexCount ( ) const
inline

Vertex count.

Author: Tyler Parke

Date: 2017-11-19

Returns
An uint04.

Definition at line 194 of file PolyLine.hpp.

Referenced by as(), Extruder::Extrude(), length(), operator*(), Geometry::polylines(), and simplify().

◆ vertices()

template<uint01 t_dims, class t_type, class t_vertex = Vertex<t_dims, t_type>>
const Buffer< t_vertex > & Polyline< t_dims, 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 179 of file PolyLine.hpp.

Referenced by setVertices().


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