|
VisiLibity v1 Source Code 1.0
|
#include <cmath>#include <queue>#include <set>#include <vector>#include <algorithm>#include <array>#include <cassert>#include <cstdlib>#include <cstring>#include <ctime>#include <fstream>#include <iostream>#include <list>#include <string>Go to the source code of this file.
Classes | |
| struct | VisiLibity::Bounding_Box |
| rectangle with sides parallel to the x- and y-axes More... | |
| class | VisiLibity::Point |
| Point in the plane represented by Cartesian coordinates. More... | |
| class | VisiLibity::Line_Segment |
| line segment in the plane represented by its endpoints More... | |
| class | VisiLibity::Angle |
| angle in radians represented by a value in the interval [0,2*M_PI] More... | |
| class | VisiLibity::Polar_Point |
| Point in the plane packaged together with polar coordinates w.r.t. specified origin. More... | |
| class | VisiLibity::Ray |
| ray in the plane represented by base Point and bearing Angle More... | |
| class | VisiLibity::Polyline |
| oriented polyline in the plane represented by list of vertices More... | |
| class | VisiLibity::Polygon |
| simple polygon in the plane represented by list of vertices More... | |
| class | VisiLibity::Environment |
| environment represented by simple polygonal outer boundary with simple polygonal holes More... | |
| class | VisiLibity::Environment::Shortest_Path_Node |
| class | VisiLibity::Guards |
| set of Guards represented by a list of Points More... | |
| class | VisiLibity::Visibility_Polygon |
| visibility polygon of a Point in an Environment or Polygon More... | |
| struct | VisiLibity::Visibility_Polygon::Polar_Edge |
| class | VisiLibity::Visibility_Polygon::Polar_Point_With_Edge_Info |
| class | VisiLibity::Visibility_Polygon::Incident_Edge_Compare |
| class | VisiLibity::Visibility_Graph |
| visibility graph of points in an Environment, represented by adjacency matrix More... | |
| class | VisiLibity::Unit_Test |
| Utilities for writing VisiLibity unit tests. More... | |
| class | VisiLibity::Shortest_Path_Test |
| Utilities for writing shortest path VisiLibity unit tests. More... | |
Namespaces | |
| namespace | VisiLibity |
| VisiLibity's sole namespace. | |
Functions | |
| double | VisiLibity::uniform_random_sample (double lower_bound, double upper_bound) |
| get a uniform random sample from an (inclusive) interval on the real line More... | |
| bool | VisiLibity::operator== (const Point &point1, const Point &point2) |
| True iff Points' coordinates are identical. More... | |
| bool | VisiLibity::operator!= (const Point &point1, const Point &point2) |
| True iff Points' coordinates are not identical. | |
| bool | VisiLibity::operator< (const Point &point1, const Point &point2) |
| compare lexicographic order of points More... | |
| bool | VisiLibity::operator> (const Point &point1, const Point &point2) |
| compare lexicographic order of points More... | |
| bool | VisiLibity::operator>= (const Point &point1, const Point &point2) |
| compare lexicographic order of points More... | |
| bool | VisiLibity::operator<= (const Point &point1, const Point &point2) |
| compare lexicographic order of points More... | |
| Point | VisiLibity::operator+ (const Point &point1, const Point &point2) |
| vector addition of Points | |
| Point | VisiLibity::operator- (const Point &point1, const Point &point2) |
| vector subtraction of Points | |
| Point | VisiLibity::operator* (const Point &point1, const Point &point2) |
| Point | VisiLibity::operator* (double scalar, const Point &point2) |
| simple scaling treats the Point as a vector | |
| Point | VisiLibity::operator* (const Point &point1, double scalar) |
| simple scaling treats the Point as a vector | |
| double | VisiLibity::cross (const Point &point1, const Point &point2) |
| cross product (signed) magnitude treats the Points as vectors More... | |
| double | VisiLibity::distance (const Point &point1, const Point &point2) |
| Euclidean distance between Points. More... | |
| double | VisiLibity::distance (const Point &point_temp, const Line_Segment &line_segment_temp) |
| Euclidean distance between a Point and a Line_Segment. More... | |
| double | VisiLibity::distance (const Line_Segment &line_segment_temp, const Point &point_temp) |
| Euclidean distance between a Point and a Line_Segment. More... | |
| double | VisiLibity::distance (const Point &point_temp, const Ray &ray_temp) |
| Euclidean distance between a Point and a Ray. More... | |
| double | VisiLibity::distance (const Ray &ray_temp, const Point &point_temp) |
| Euclidean distance between a Point and a Ray. More... | |
| double | VisiLibity::distance (const Point &point_temp, const Polyline &polyline_temp) |
| Euclidean distance between a Point and a Polyline. More... | |
| double | VisiLibity::distance (const Polyline &polyline_temp, const Point &point_temp) |
| Euclidean distance between a Point and a Polyline. More... | |
| double | VisiLibity::boundary_distance (const Point &point_temp, const Polygon &polygon_temp) |
| Euclidean distance between a Point and a Polygon's boundary. More... | |
| double | VisiLibity::boundary_distance (const Polygon &polygon_temp, const Point &point_temp) |
| Euclidean distance between a Point and a Polygon's boundary. More... | |
| double | VisiLibity::boundary_distance (const Point &point_temp, const Environment &environment_temp) |
| Euclidean distance between a Point and a Environment's boundary. More... | |
| double | VisiLibity::boundary_distance (const Environment &environment_temp, const Point &point_temp) |
| Euclidean distance between a Point and a Environment's boundary. More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Point &point_temp) |
| print a Point | |
| bool | VisiLibity::operator== (const Line_Segment &line_segment1, const Line_Segment &line_segment2) |
| true iff endpoint coordinates are exactly equal, but false if either Line_Segment has size 0 More... | |
| bool | VisiLibity::operator!= (const Line_Segment &line_segment1, const Line_Segment &line_segment2) |
| true iff endpoint coordinates are not == | |
| bool | VisiLibity::equivalent (Line_Segment line_segment1, Line_Segment line_segment2, double epsilon=0) |
| true iff line segments' endpoints match up w/in a (closed) epsilon ball of each other, but false if either Line_Segment has size 0 More... | |
| double | VisiLibity::distance (const Line_Segment &line_segment1, const Line_Segment &line_segment2) |
| Euclidean distance between Line_Segments. More... | |
| double | VisiLibity::boundary_distance (const Line_Segment &line_segment, const Polygon &polygon) |
| Euclidean distance between a Line_Segment and the boundary of a Polygon. More... | |
| double | VisiLibity::boundary_distance (const Polygon &polygon, const Line_Segment &line_segment) |
| Euclidean distance between a Line_Segment and the boundary of a Polygon. More... | |
| bool | VisiLibity::intersect (const Line_Segment &line_segment1, const Line_Segment &line_segment2, double epsilon=0.0) |
| true iff the Euclidean distance between Line_Segments is no greater than epsilon, false if either line segment has size 0 More... | |
| bool | VisiLibity::intersect_proper (const Line_Segment &line_segment1, const Line_Segment &line_segment2, double epsilon=0.0) |
| true iff line segments intersect properly w/in epsilon, false if either line segment has size 0 More... | |
| Line_Segment | VisiLibity::intersection (const Line_Segment &line_segment1, const Line_Segment &line_segment2, double epsilon=0.0) |
| intersection of Line_Segments More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Line_Segment &line_segment_temp) |
| print a Line_Segment | |
| bool | VisiLibity::operator== (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| bool | VisiLibity::operator!= (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| bool | VisiLibity::operator> (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| bool | VisiLibity::operator< (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| bool | VisiLibity::operator>= (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| bool | VisiLibity::operator<= (const Angle &angle1, const Angle &angle2) |
| compare angle radians | |
| Angle | VisiLibity::operator+ (const Angle &angle1, const Angle &angle2) |
| add angles' radians and mod into [0, 2*M_PI) | |
| Angle | VisiLibity::operator- (const Angle &angle1, const Angle &angle2) |
| subtract angles' radians and mod into [0, 2*M_PI) | |
| double | VisiLibity::geodesic_distance (const Angle &angle1, const Angle &angle2) |
| geodesic distance in radians between Angles More... | |
| double | VisiLibity::geodesic_direction (const Angle &angle1, const Angle &angle2) |
| 1.0 => geodesic path from angle1 to angle2 is couterclockwise, -1.0 => clockwise More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Angle &angle_temp) |
| print Angle | |
| bool | VisiLibity::operator== (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| compare member data More... | |
| bool | VisiLibity::operator!= (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| bool | VisiLibity::operator> (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| compare according to polar lexicographic order (smaller bearing, then smaller range) More... | |
| bool | VisiLibity::operator< (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| compare according to polar lexicographic order (smaller bearing, then smaller range) More... | |
| bool | VisiLibity::operator>= (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| compare according to polar lexicographic order (smaller bearing, then smaller range) More... | |
| bool | VisiLibity::operator<= (const Polar_Point &polar_point1, const Polar_Point &polar_point2) |
| compare according to polar lexicographic order (smaller bearing, then smaller range) More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Polar_Point &polar_point_temp) |
| print Polar_Point | |
| bool | VisiLibity::operator== (const Ray &ray1, const Ray &ray2) |
| compare member data More... | |
| bool | VisiLibity::operator!= (const Ray &ray1, const Ray &ray2) |
| compare member data More... | |
| Line_Segment | VisiLibity::intersection (const Ray ray_temp, const Line_Segment &line_segment_temp, double epsilon=0.0) |
| compute the intersection of a Line_Segment with a Ray More... | |
| Line_Segment | VisiLibity::intersection (const Line_Segment &line_segment_temp, const Ray &ray_temp, double epsilon=0.0) |
| compute the intersection of a Line_Segment with a Ray More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Polyline &polyline_temp) |
| bool | VisiLibity::operator== (Polygon polygon1, Polygon polygon2) |
| true iff vertex lists are identical, but false if either Polygon has size 0 More... | |
| bool | VisiLibity::operator!= (Polygon polygon1, Polygon polygon2) |
| bool | VisiLibity::equivalent (Polygon polygon1, Polygon polygon2, double epsilon=0.0) |
| true iff the Polygon's vertices match up w/in a (closed) epsilon ball of each other, but false if either Polygon has size 0 More... | |
| double | VisiLibity::boundary_distance (const Polygon &polygon1, const Polygon &polygon2) |
| Euclidean distance between Polygons' boundaries. More... | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Polygon &polygon_temp) |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Environment &environment_temp) |
| printing Environment | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Guards &guards) |
| print Guards | |
| std::ostream & | VisiLibity::operator<< (std::ostream &outs, const Visibility_Graph &visibility_graph) |
| print Visibility_Graph adjacency matrix | |
Variables | |
| const int | VisiLibity::FIOS_PRECISION = 10 |
| floating-point display precision. More... | |
VisiLibity: A Floating-Point Visibility Algorithms Library, Copyright (C) 2008 Karl J. Obermeyer (karl.obermeyer [ at ] gmail.com)
This file is part of VisiLibity v1.
VisiLibity v1 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
VisiLibity v1 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with VisiLibity v1. If not, see http://www.gnu.org/licenses/.