|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Gift wrapping (Jarvis march) convex hull algorithm. More...
#include <geom_algorithms.H>
Public Member Functions | |
| Polygon | operator() (DynList< Point > &point_set) |
| Compute the convex hull of a point set. | |
Private Member Functions | |
| Point * | get_lowest_point (DynList< Point > &point_set) |
Gift wrapping (Jarvis march) convex hull algorithm.
Computes the convex hull by starting from the lowest point and "wrapping" around the point set, always selecting the point that makes the smallest counter-clockwise angle.
Definition at line 481 of file geom_algorithms.H.
|
inlineprivate |
Definition at line 483 of file geom_algorithms.H.
References Aleph::DynList< T >::Iterator::get_curr(), Aleph::HTList::Iterator::has_curr(), Aleph::maps(), Aleph::HTList::Iterator::next(), and Aleph::HTList::Iterator::next_ne().
Referenced by operator()().
Compute the convex hull of a point set.
| point_set | The input points. |
Definition at line 508 of file geom_algorithms.H.
References Segment::counterclockwise_angle_with(), get_lowest_point(), Aleph::HTList::Iterator::has_curr(), and Aleph::maps().