oriented polyline in the plane represented by list of vertices
More...
#include <visilibity.hpp>
|
| Polyline () |
| default to empty
|
|
| Polyline (const std::vector< Point > &vertices_temp) |
| construct from vector of vertices
|
|
| Polyline (const std::string &filename) |
| construct from file
|
|
Point | operator[] (unsigned i) const |
| raw access More...
|
|
unsigned | size () const |
| vertex count
|
|
double | length () const |
| Euclidean length of the Polyline.
|
|
double | diameter () const |
| Euclidean diameter. More...
|
|
Bounding_Box | bbox () const |
|
Point & | operator[] (unsigned i) |
| raw access More...
|
|
void | clear () |
| erase all points
|
|
void | push_back (const Point &point_temp) |
| add a vertex to the back (end) of the list
|
|
void | pop_back () |
| delete a vertex to the back (end) of the list
|
|
void | set_vertices (const std::vector< Point > &vertices_temp) |
| reset the whole list of vertices at once
|
|
void | eliminate_redundant_vertices (double epsilon=0.0) |
| eliminates vertices which are (epsilon) - colinear with their respective neighbors More...
|
|
void | reverse () |
| reverse order of vertices
|
|
void | append (const Polyline &polyline) |
| append the points from another polyline
|
|
bool | operator== (const VisiLibity::Polyline &other) |
| Compare two Polylines.
|
|
|
std::vector< Point > | vertices_ |
|
oriented polyline in the plane represented by list of vertices
◆ diameter()
double VisiLibity::Polyline::diameter |
( |
| ) |
const |
Euclidean diameter.
- Precondition
- Polyline has greater than 0 vertices
- Returns
- the maximum Euclidean distance between all pairs of vertices
◆ eliminate_redundant_vertices()
void VisiLibity::Polyline::eliminate_redundant_vertices |
( |
double |
epsilon = 0.0 | ) |
|
eliminates vertices which are (epsilon) - colinear with their respective neighbors
- Author
- Karl J. Obermeyer
- Postcondition
- the Euclidean distance between each vertex and the line segment connecting its neighbors is at least epsilon
◆ operator[]() [1/2]
Point & VisiLibity::Polyline::operator[] |
( |
unsigned |
i | ) |
|
|
inline |
◆ operator[]() [2/2]
Point VisiLibity::Polyline::operator[] |
( |
unsigned |
i | ) |
const |
|
inline |
The documentation for this class was generated from the following files: