|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Compute the full planar subdivision induced by a set of segments. More...
#include <geom_algorithms.H>
Classes | |
| struct | ArrEdge |
| Represents an edge in the planar subdivision. More... | |
| struct | ArrFace |
| Represents a face (region) in the planar subdivision. More... | |
| struct | HalfEdge |
| Internal half-edge structure used for face traversal. More... | |
| struct | Result |
| The complete result of the segment arrangement computation. More... | |
Public Member Functions | |
| Result | operator() (const Array< Segment > &segments) const |
| Compute the arrangement of a set of segments. | |
Static Private Member Functions | |
| static bool | pt_less (const Point &a, const Point &b) |
| Lexicographic point comparison. | |
| static size_t | find_vertex (const Array< Point > &verts, const Point &p) |
| Find the index of point p in a sorted vertex array (binary search). | |
| static int | angle_quad (const Geom_Number &dx, const Geom_Number &dy) |
| Angular quadrant of direction (dx, dy). | |
| static bool | angle_lt (const Geom_Number &dx1, const Geom_Number &dy1, const Geom_Number &dx2, const Geom_Number &dy2) |
| Compare two directions from the same origin by angle (exact). | |
Static Private Attributes | |
| static constexpr size_t | NONE = ~static_cast<size_t>(0) |
Compute the full planar subdivision induced by a set of segments.
Given n segments, produces:
For n segments with k intersections:
Definition at line 10359 of file geom_algorithms.H.
|
inlinestaticprivate |
Compare two directions from the same origin by angle (exact).
Returns true if (dx1,dy1) has a smaller CCW angle than (dx2,dy2).
Definition at line 10428 of file geom_algorithms.H.
References angle_quad(), and Aleph::divide_and_conquer_partition_dp().
|
inlinestaticprivate |
Angular quadrant of direction (dx, dy).
Definition at line 10417 of file geom_algorithms.H.
References Aleph::and, and Aleph::divide_and_conquer_partition_dp().
Referenced by angle_lt().
|
inlinestaticprivate |
Find the index of point p in a sorted vertex array (binary search).
Definition at line 10402 of file geom_algorithms.H.
References Aleph::divide_and_conquer_partition_dp(), NONE, and pt_less().
Referenced by operator()().
Compute the arrangement of a set of segments.
| segments | Input segments (non-degenerate). |
Definition at line 10461 of file geom_algorithms.H.
References Aleph::Array< T >::append(), Aleph::divide_and_conquer_partition_dp(), find_vertex(), Aleph::Point::get_x(), NONE, pt_less(), Aleph::quicksort_op(), Aleph::Array< T >::reserve(), Aleph::Array< T >::size(), Aleph::SegmentArrangement::ArrFace::unbounded, and Aleph::vertical.
|
inlinestaticprivate |
Lexicographic point comparison.
Definition at line 10395 of file geom_algorithms.H.
References Aleph::Point::get_x(), and Aleph::Point::get_y().
Referenced by find_vertex(), and operator()().
|
staticconstexprprivate |
Definition at line 10392 of file geom_algorithms.H.
Referenced by find_vertex(), and operator()().