18 #ifndef B2_VORONOI_DIAGRAM
19 #define B2_VORONOI_DIAGRAM
21 #include <Box2D/Common/b2Math.h>
45 void Generate(float32 radius, float32 margin);
53 virtual void operator()(int32 a, int32 b, int32 c) = 0;
69 struct b2VoronoiDiagramTask
72 Generator* m_generator;
74 b2VoronoiDiagramTask() {}
75 b2VoronoiDiagramTask(int32 x, int32 y, int32 i, Generator* g)
85 Generator* m_generatorBuffer;
86 int32 m_generatorCapacity;
87 int32 m_generatorCount;
88 int32 m_countX, m_countY;
89 Generator** m_diagram;
void AddGenerator(const b2Vec2 ¢er, int32 tag, bool necessary)
Definition: b2VoronoiDiagram.cpp:45
Definition: b2StackAllocator.h:37
virtual void operator()(int32 a, int32 b, int32 c)=0
Receive tags for generators associated with a node.
A field representing the nearest generator from each point.
Definition: b2VoronoiDiagram.h:27
Callback used by GetNodes().
Definition: b2VoronoiDiagram.h:48
An axis aligned bounding box.
Definition: b2Collision.h:162
void Generate(float32 radius, float32 margin)
Definition: b2VoronoiDiagram.cpp:55
A 2D column vector.
Definition: b2Math.h:56
void GetNodes(NodeCallback &callback) const
Definition: b2VoronoiDiagram.cpp:195