|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Fortune sweep-line Voronoi construction. More...
#include <geom_algorithms.H>
Classes | |
| struct | Arc |
| Arc in the beach-line state structure. More... | |
| struct | Event |
| Forward declaration of beach-line arc. More... | |
| struct | EventCmp |
| Comparator for prioritizing events in the sweep-line. More... | |
| struct | TriKey |
| Key for identifying a triangle by its vertex indices. More... | |
Public Types | |
| using | Edge = VoronoiDiagramFromDelaunay::Edge |
| Type for Voronoi edges. | |
| using | Cell = VoronoiDiagramFromDelaunay::Cell |
| Type for Voronoi cells. | |
| using | ClippedCell = VoronoiDiagramFromDelaunay::ClippedCell |
| Type for clipped Voronoi cells. | |
| using | Result = VoronoiDiagramFromDelaunay::Result |
| Complete result structure. | |
Public Member Functions | |
| Result | operator() (const DynList< Point > &pts) const |
| Compute the Voronoi diagram for a list of points. | |
| Result | operator() (const std::initializer_list< Point > il) const |
| Compute the Voronoi diagram from an initializer list. | |
| Array< ClippedCell > | clipped_cells (const DynList< Point > &pts, const Polygon &clip) const |
| Compute Voronoi cells clipped to a bounding polygon. | |
| Array< ClippedCell > | clipped_cells (const std::initializer_list< Point > il, const Polygon &clip) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Private Attributes | |
| VoronoiDiagramFromDelaunay | voronoi_ |
| DelaunayTriangulationBowyerWatson | fallback_ |
Static Private Attributes | |
| static constexpr double | kEps = 1e-9 |
Fortune sweep-line Voronoi construction.
This class computes a Delaunay triangulation via Fortune's beach-line sweep (site + circle events) and then reuses VoronoiDiagramFromDelaunay to build Voronoi vertices/edges/cells, avoiding duplicated dual logic.
Fortune's algorithm is a sweep-line algorithm for generating Voronoi diagrams in O(n log n) time.
Definition at line 4237 of file geom_algorithms.H.
Type for Voronoi cells.
Definition at line 4241 of file geom_algorithms.H.
Type for clipped Voronoi cells.
Definition at line 4242 of file geom_algorithms.H.
Type for Voronoi edges.
Definition at line 4240 of file geom_algorithms.H.
Complete result structure.
Definition at line 4243 of file geom_algorithms.H.
|
inlinestaticprivate |
Definition at line 4322 of file geom_algorithms.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::COLLINEAR, and Aleph::orientation().
Referenced by triangulate_sweep().
|
inlinestaticprivate |
Definition at line 4317 of file geom_algorithms.H.
References Aleph::geom_number_to_double().
Referenced by breakpoint_x(), enqueue_circle_event(), and triangulate_sweep().
|
inlinestaticprivate |
Definition at line 4343 of file geom_algorithms.H.
References ah_domain_error_if, as_double(), Aleph::blossom_maximum_cardinality_matching(), and kEps.
Referenced by locate_arc().
|
inline |
Compute Voronoi cells clipped to a bounding polygon.
| pts | Input list of sites. |
| clip | Bounding polygon used for clipping. |
Definition at line 4683 of file geom_algorithms.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::VoronoiDiagramFromDelaunay::clipped_cells_indexed().
Referenced by clipped_cells(), and TEST_F().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 4689 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), Aleph::blossom_maximum_cardinality_matching(), and clipped_cells().
|
inlinestaticprivate |
Definition at line 4417 of file geom_algorithms.H.
References as_double(), Aleph::blossom_maximum_cardinality_matching(), Aleph::VoronoiDiagramFortune::Arc::circle, Aleph::CW, Aleph::Point::get_x(), Aleph::Point::get_y(), invalidate_circle_event(), kEps, Aleph::VoronoiDiagramFortune::Arc::next, Aleph::orientation(), Aleph::VoronoiDiagramFortune::Arc::prev, Aleph::DynBinHeap< T, Compare >::put(), r, Aleph::VoronoiDiagramFortune::Arc::site, and Aleph::VoronoiDiagramFortune::Event::y.
Referenced by triangulate_sweep().
Definition at line 4408 of file geom_algorithms.H.
References Aleph::and, Aleph::VoronoiDiagramFortune::Arc::circle, and Aleph::VoronoiDiagramFortune::Event::valid.
Referenced by enqueue_circle_event(), and triangulate_sweep().
|
inlinestaticprivate |
Validates if a triangulation holds the Delaunay property (empty circumcircle).
| dt | The triangulation result to validate. |
Definition at line 4485 of file geom_algorithms.H.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), Aleph::CCW, Aleph::COLLINEAR, Aleph::CW, Aleph::in_circle_determinant(), k, Aleph::orientation(), Aleph::DelaunayTriangulationBowyerWatson::Result::sites, and Aleph::DelaunayTriangulationBowyerWatson::Result::triangles.
Referenced by operator()().
|
inlinestaticprivate |
Definition at line 4381 of file geom_algorithms.H.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), breakpoint_x(), kEps, Aleph::VoronoiDiagramFortune::Arc::next, and Aleph::VoronoiDiagramFortune::Arc::prev.
Referenced by triangulate_sweep().
|
inlinestaticprivate |
Definition at line 4335 of file geom_algorithms.H.
References Aleph::CW, k, and Aleph::orientation().
Referenced by triangulate_sweep().
Compute the Voronoi diagram for a list of points.
| pts | Input list of sites. |
Definition at line 4649 of file geom_algorithms.H.
References Aleph::blossom_maximum_cardinality_matching(), fallback_, is_valid_delaunay(), triangulate_sweep(), and voronoi_.
|
inline |
Compute the Voronoi diagram from an initializer list.
| il | Initializer list of points. |
Definition at line 4669 of file geom_algorithms.H.
References Aleph::DynList< T >::append(), and Aleph::blossom_maximum_cardinality_matching().
|
inlinestaticprivate |
Definition at line 4511 of file geom_algorithms.H.
References ah_domain_error_if, all_collinear(), as_double(), Aleph::blossom_maximum_cardinality_matching(), Aleph::VoronoiDiagramFortune::Arc::circle, Aleph::COLLINEAR, enqueue_circle_event(), Aleph::DynBinHeap< T, Compare >::get(), invalidate_circle_event(), Aleph::GenBinHeap< NodeType, Key, Compare >::is_empty(), k, kEps, locate_arc(), Aleph::VoronoiDiagramFortune::Arc::next, normalized_triangle(), Aleph::orientation(), out, Aleph::VoronoiDiagramFortune::Arc::prev, Aleph::DynBinHeap< T, Compare >::put(), Aleph::Array< T >::reserve(), Aleph::VoronoiDiagramFortune::Arc::site, Aleph::Array< T >::size(), and Aleph::VoronoiDiagramFortune::Event::y.
Referenced by operator()().
|
private |
Definition at line 4315 of file geom_algorithms.H.
Referenced by operator()().
Definition at line 4312 of file geom_algorithms.H.
Referenced by breakpoint_x(), enqueue_circle_event(), locate_arc(), and triangulate_sweep().
|
private |
Definition at line 4314 of file geom_algorithms.H.
Referenced by operator()().