|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
The trapezoidal map and DAG search structure. More...
#include <geom_algorithms.H>
Public Member Functions | |
| LocationResult | locate (const Point &p) const |
| Locate a point in the trapezoidal map. | |
| bool | contains (const Point &p) const |
| Check if point is inside any input polygon. | |
Public Attributes | |
| Array< Point > | points |
| Unique endpoints of all segments. | |
| Array< Segment > | segments |
| Input segments. | |
| Array< Trapezoid > | trapezoids |
| All trapezoids created during construction. | |
| Array< DagNode > | dag |
| The search directed acyclic graph. | |
| size_t | dag_root |
| Index of the DAG root node. | |
| size_t | num_input_segments |
| Number of segments originally provided. | |
| size_t | num_input_points |
| Number of unique points derived from segments. | |
The trapezoidal map and DAG search structure.
Definition at line 13038 of file geom_algorithms.H.
Check if point is inside any input polygon.
Uses vertical ray casting over the input segments. This only works when the map was built from closed polygons (via the polygon overloads).
| p | The query point. |
p is inside or on the boundary of an input polygon. Definition at line 13110 of file geom_algorithms.H.
References contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), Aleph::Point::get_x(), Aleph::Point::get_y(), num_input_points, num_input_segments, points, and segments.
Referenced by contains().
|
inline |
Locate a point in the trapezoidal map.
Walks the DAG from the root.
| p | The query point. |
Definition at line 13059 of file geom_algorithms.H.
References Aleph::area_of_parallelogram(), Aleph::Segment::contains(), dag, dag_root, Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), Aleph::TrapezoidalMapPointLocation::LEAF, Aleph::TrapezoidalMapPointLocation::NONE, Aleph::TrapezoidalMapPointLocation::ON_POINT, Aleph::TrapezoidalMapPointLocation::ON_SEGMENT, points, segments, Aleph::TrapezoidalMapPointLocation::TRAPEZOID, and Aleph::TrapezoidalMapPointLocation::X_NODE.
The search directed acyclic graph.
Definition at line 13043 of file geom_algorithms.H.
Referenced by locate().
| size_t Aleph::TrapezoidalMapPointLocation::Result::dag_root |
Index of the DAG root node.
Definition at line 13044 of file geom_algorithms.H.
Referenced by locate().
| size_t Aleph::TrapezoidalMapPointLocation::Result::num_input_points |
Number of unique points derived from segments.
Definition at line 13046 of file geom_algorithms.H.
Referenced by contains().
| size_t Aleph::TrapezoidalMapPointLocation::Result::num_input_segments |
Number of segments originally provided.
Definition at line 13045 of file geom_algorithms.H.
Referenced by contains(), and Aleph::TrapezoidalMapPointLocation::operator()().
Unique endpoints of all segments.
Definition at line 13040 of file geom_algorithms.H.
Referenced by contains(), and locate().
Input segments.
Definition at line 13041 of file geom_algorithms.H.
Referenced by contains(), and locate().
All trapezoids created during construction.
Definition at line 13042 of file geom_algorithms.H.