MyGAL
|
Implementation of Fortune's algorithm. More...
#include <FortuneAlgorithm.h>
Public Member Functions | |
FortuneAlgorithm (std::vector< Vector2< T >> points) | |
Constructor of FortuneAlgorithm. More... | |
void | construct () |
Execute Fortune's algorithm to construct the diagram. More... | |
bool | bound (Box< T > box) |
Bound the Voronoi diagram. More... | |
Diagram< T > | getDiagram () |
Return the constructed diagram. More... | |
Implementation of Fortune's algorithm.
T | Floating point type (float , double or long double ) to use in the algorithm |
|
inlineexplicit |
Constructor of FortuneAlgorithm.
The points must all be unique.
points | Coordinates of the sites that will be used to generate the Voronoi diagram |
Definition at line 53 of file FortuneAlgorithm.h.
|
inline |
Bound the Voronoi diagram.
The method FortuneAlgorithm::construct must be called before this one to construct the diagram.
The algorithm does not guarantee that the box passed as parameter will be used for bounding. It only guarantees that the used box contains the one passed as parameter.
box | Smallest box to use for bounding |
Definition at line 95 of file FortuneAlgorithm.h.
|
inline |
Execute Fortune's algorithm to construct the diagram.
At the end of this method, the diagram is unbounded. The method FortuneAlgorithm::bound shoud be called to bound the diagram.
Definition at line 64 of file FortuneAlgorithm.h.
|
inline |
Return the constructed diagram.
The diagram is moved thus the method can only be called once.
Definition at line 135 of file FortuneAlgorithm.h.