|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
BST-based sweep status for active edges, ordered by ray-intersection distance. More...
Classes | |
| struct | EdgeKey |
| struct | EdgeKeyCmp |
Public Member Functions | |
| EdgeStatusTree (const Array< Point > &verts, const size_t n, const Point &query) | |
| void | insert (const size_t edge, const Point &dir) |
| void | erase (const size_t edge) |
| size_t | min () const |
| Return the nearest edge (smallest ray_param). | |
| bool | contains (const size_t edge) const |
| bool | is_empty () const |
Private Attributes | |
| DynSetTree< EdgeKey, Treap, EdgeKeyCmp > | tree_ |
| Array< Geom_Number > | params_ |
| Array< bool > | in_tree_ |
| const Array< Point > & | verts_ |
| const size_t | n_ |
| const Point & | query_ |
BST-based sweep status for active edges, ordered by ray-intersection distance.
Each edge is keyed by (ray_param, edge_index) computed at insertion time. Since the distance ordering of non-crossing edges is invariant between consecutive vertex events, the BST ordering remains valid throughout the sweep.
Backed by Aleph's Treap via DynSetTree. Provides O(log n) insert, erase and min (nearest edge).
Definition at line 9319 of file geom_algorithms.H.
|
inline |
Definition at line 9345 of file geom_algorithms.H.
References Aleph::Array< T >::append(), in_tree_, and params_.
|
inline |
Definition at line 9384 of file geom_algorithms.H.
References in_tree_.
|
inline |
Definition at line 9366 of file geom_algorithms.H.
References in_tree_, params_, and tree_.
Referenced by Aleph::VisibilityPolygon::operator()().
|
inline |
Definition at line 9355 of file geom_algorithms.H.
References in_tree_, Aleph::Array< T >::insert(), n_, params_, query_, Aleph::VisibilityPolygon::ray_param(), tree_, and verts_.
Referenced by Aleph::VisibilityPolygon::operator()().
|
inline |
Definition at line 9389 of file geom_algorithms.H.
References tree_.
|
inline |
Return the nearest edge (smallest ray_param).
Returns n_ if the tree is empty.
Definition at line 9377 of file geom_algorithms.H.
Referenced by Aleph::VisibilityPolygon::operator()().
|
private |
Definition at line 9339 of file geom_algorithms.H.
Referenced by EdgeStatusTree(), contains(), erase(), and insert().
|
private |
Definition at line 9341 of file geom_algorithms.H.
|
private |
Definition at line 9338 of file geom_algorithms.H.
Referenced by EdgeStatusTree(), erase(), and insert().
|
private |
Definition at line 9342 of file geom_algorithms.H.
Referenced by insert().
|
private |
Definition at line 9337 of file geom_algorithms.H.
Referenced by erase(), insert(), is_empty(), and min().
Definition at line 9340 of file geom_algorithms.H.
Referenced by insert().