|
VisiLibity v1 Source Code 1.0
|
set of Guards represented by a list of Points More...
#include <visilibity.hpp>
Public Member Functions | |
| Guards () | |
| default to empty | |
| Guards (const std::string &filename) | |
| construct from *.guards file More... | |
| Guards (const std::vector< Point > &positions) | |
| construct from STL vector of Points | |
| const Point & | operator[] (unsigned i) const |
| raw access to guard position Points More... | |
| unsigned | N () const |
| guard count | |
| bool | are_lex_ordered () const |
| true iff positions are lexicographically ordered | |
| bool | noncolocated (double epsilon=0.0) const |
| true iff no two guards are w/in epsilon of each other | |
| bool | in (const Polygon &polygon_temp, double epsilon=0.0) const |
| true iff all guards are located in polygon_temp | |
| bool | in (const Environment &environment_temp, double epsilon=0.0) const |
| true iff all guards are located in environment_temp | |
| double | diameter () const |
| Euclidean diameter. More... | |
| Bounding_Box | bbox () const |
| box which fits snugly around the Guards More... | |
| void | write_to_file (const std::string &filename, int fios_precision_temp=FIOS_PRECISION) |
| write list of positions to *.guards file More... | |
| Point & | operator[] (unsigned i) |
| raw access to guard position Points More... | |
| void | push_back (const Point &point_temp) |
| add a guard | |
| void | set_positions (const std::vector< Point > &positions_temp) |
| set positions with STL vector of Points | |
| void | enforce_lex_order () |
| sort positions in lexicographic order More... | |
| void | reverse () |
| reverse order of positions | |
| void | snap_to_vertices_of (const Environment &environment_temp, double epsilon=0.0) |
| relocate each guard to closest vertex if within epsilon of some vertex (of environment_temp) More... | |
| void | snap_to_vertices_of (const Polygon &polygon_temp, double epsilon=0.0) |
| relocate each guard to closest vertex if within epsilon of some vertex (of environment_temp) More... | |
| void | snap_to_boundary_of (const Environment &environment_temp, double epsilon=0.0) |
| relocate each guard to closest Point on boundary if within epsilon of the boundary (of environment_temp) More... | |
| void | snap_to_boundary_of (const Polygon &polygon_temp, double epsilon=0.0) |
| relocate each guard to closest Point on boundary if within epsilon of the boundary (of polygon_temp) More... | |
Private Attributes | |
| std::vector< Point > | positions_ |
Friends | |
| class | Visibility_Graph |
set of Guards represented by a list of Points
| VisiLibity::Guards::Guards | ( | const std::string & | filename | ) |
construct from *.guards file
| Bounding_Box VisiLibity::Guards::bbox | ( | ) | const |
box which fits snugly around the Guards
| double VisiLibity::Guards::diameter | ( | ) | const |
Euclidean diameter.
| void VisiLibity::Guards::enforce_lex_order | ( | ) |
sort positions in lexicographic order
from (lowest x, then lowest y) to (highest x, then highest y)
|
inline |
raw access to guard position Points
|
inline |
raw access to guard position Points
| void VisiLibity::Guards::snap_to_boundary_of | ( | const Environment & | environment_temp, |
| double | epsilon = 0.0 |
||
| ) |
relocate each guard to closest Point on boundary if within epsilon of the boundary (of environment_temp)
| void VisiLibity::Guards::snap_to_boundary_of | ( | const Polygon & | polygon_temp, |
| double | epsilon = 0.0 |
||
| ) |
relocate each guard to closest Point on boundary if within epsilon of the boundary (of polygon_temp)
| void VisiLibity::Guards::snap_to_vertices_of | ( | const Environment & | environment_temp, |
| double | epsilon = 0.0 |
||
| ) |
relocate each guard to closest vertex if within epsilon of some vertex (of environment_temp)
| void VisiLibity::Guards::snap_to_vertices_of | ( | const Polygon & | polygon_temp, |
| double | epsilon = 0.0 |
||
| ) |
relocate each guard to closest vertex if within epsilon of some vertex (of environment_temp)
| void VisiLibity::Guards::write_to_file | ( | const std::string & | filename, |
| int | fios_precision_temp = FIOS_PRECISION |
||
| ) |
write list of positions to *.guards file
Uses intuitive human and computer readable decimal format with display precision fios_precision_temp.