A field representing the nearest generator from each point.
More...
#include <b2VoronoiDiagram.h>
A field representing the nearest generator from each point.
void b2VoronoiDiagram::AddGenerator |
( |
const b2Vec2 & |
center, |
|
|
int32 |
tag, |
|
|
bool |
necessary |
|
) |
| |
Add a generator.
- Parameters
-
the | position of the generator. |
a | tag used to identify the generator in callback functions. |
whether | to callback for nodes associated with the generator. |
void b2VoronoiDiagram::Generate |
( |
float32 |
radius, |
|
|
float32 |
margin |
|
) |
| |
Generate the Voronoi diagram. It is rasterized with a given interval in the same range as the necessary generators exist.
- Parameters
-
the | interval of the diagram. |
margin | for which the range of the diagram is extended. |
void b2VoronoiDiagram::GetNodes |
( |
NodeCallback & |
callback | ) |
const |
Enumerate all nodes that contain at least one necessary generator.
- Parameters
-
a | callback function object called for each node. |
The documentation for this class was generated from the following files: