VisiLibity v1 Source Code 1.0
|
visibility polygon of a Point in an Environment or Polygon More...
#include <visilibity.hpp>
Classes | |
class | Incident_Edge_Compare |
struct | Polar_Edge |
class | Polar_Point_With_Edge_Info |
Public Member Functions | |
Visibility_Polygon () | |
default to empty | |
Visibility_Polygon (const Point &observer, const Environment &environment_temp, double epsilon=0.0) | |
visibility set of a Point in an Environment More... | |
Visibility_Polygon (const Point &observer, const Polygon &polygon_temp, double epsilon=0.0) | |
visibility set of a Point in a Polygon More... | |
Point | observer () const |
location of observer which induced the visibility polygon | |
Public Member Functions inherited from VisiLibity::Polygon | |
Polygon () | |
default to empty | |
Polygon (const std::string &filename) | |
construct from *.polygon file More... | |
Polygon (const std::vector< Point > &vertices_temp) | |
construct from vector of vertices More... | |
Polygon (const Point &point0, const Point &point1, const Point &point2) | |
construct triangle from 3 Points More... | |
const Point & | operator[] (unsigned i) const |
access with automatic wrap-around in forward direction More... | |
unsigned | n () const |
vertex count More... | |
unsigned | r () const |
reflex vertex count (nonconvex vertices) More... | |
bool | is_simple (double epsilon=0.0) const |
true iff Polygon is (epsilon) simple More... | |
bool | is_in_standard_form () const |
true iff lexicographically smallest vertex is first in the list of vertices representing the Polygon More... | |
double | boundary_length () const |
perimeter length | |
double | area () const |
Point | centroid () const |
Polygon's centroid (center of mass) More... | |
double | diameter () const |
Euclidean diameter. More... | |
Bounding_Box | bbox () const |
box which fits snugly around the Polygon More... | |
std::vector< Point > | random_points (const unsigned &count, double epsilon=0.0) const |
void | write_to_file (const std::string &filename, int fios_precision_temp=FIOS_PRECISION) |
write list of vertices to *.polygon file More... | |
Point & | operator[] (unsigned i) |
access with automatic wrap-around in forward direction More... | |
void | set_vertices (const std::vector< Point > &vertices_temp) |
set vertices using STL vector of Points | |
void | push_back (const Point &vertex_temp) |
push a Point onto the back of the vertex list | |
void | clear () |
erase all vertices | |
void | enforce_standard_form () |
enforces that the lexicographically smallest vertex is first in the list of vertices representing the Polygon More... | |
void | eliminate_redundant_vertices (double epsilon=0.0) |
eliminates vertices which are (epsilon) - colinear with their respective neighbors More... | |
void | reverse () |
reverse (cyclic) order of vertices More... | |
Private Member Functions | |
bool | is_spike (const Point &observer, const Point &point1, const Point &point2, const Point &point3, double epsilon=0.0) const |
void | chop_spikes_at_back (const Point &observer, double epsilon) |
void | chop_spikes_at_wrap_around (const Point &observer, double epsilon) |
void | chop_spikes (const Point &observer, double epsilon) |
void | print_cv_and_ae (const Polar_Point_With_Edge_Info ¤t_vertex, const std::list< Polar_Edge >::iterator &active_edge) |
Private Attributes | |
Point | observer_ |
Additional Inherited Members | |
Protected Attributes inherited from VisiLibity::Polygon | |
std::vector< Point > | vertices_ |
visibility polygon of a Point in an Environment or Polygon
A Visibility_Polygon represents the closure of the set of all points in an environment which are {\it clearly visible} from a point (the observer). Two Points p1 and p2 are (mutually) {\it clearly visible} in an environment iff the relative interior of the line segment connecting p1 and p2 does not intersect the boundary of the environment.
VisiLibity::Visibility_Polygon::Visibility_Polygon | ( | const Point & | observer, |
const Environment & | environment_temp, | ||
double | epsilon = 0.0 |
||
) |
visibility set of a Point in an Environment
VisiLibity::Visibility_Polygon::Visibility_Polygon | ( | const Point & | observer, |
const Polygon & | polygon_temp, | ||
double | epsilon = 0.0 |
||
) |
visibility set of a Point in a Polygon