Implementation of b2Draw
which renders objects (body fixtures, particles, etc.) using DebugRenderer.
More...
|
| LiquidFunDebugDraw () |
| Constructs a LiquidFunDebugDraw. More...
|
|
virtual void | DrawPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override |
| Draw a closed polygon line. More...
|
|
virtual void | DrawSolidPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override |
| Draw a filled polygon. More...
|
|
virtual void | DrawCircle (const b2Vec2 ¢er, float32 radius, const b2Color &color) override |
| Draw a circle. More...
|
|
virtual void | DrawSolidCircle (const b2Vec2 ¢er, float32 radius, const b2Vec2 &axis, const b2Color &color) override |
| Draw a filled circle. More...
|
|
virtual void | DrawParticles (const b2Vec2 *centers, float32 radius, const b2ParticleColor *colors, int32 count) override |
| Draw a list of particles as circles. More...
|
|
virtual void | DrawSegment (const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color) override |
| Draw a line segment. More...
|
|
virtual void | DrawTransform (const b2Transform &xf) override |
| Draw a two dimensional transform. More...
|
|
Implementation of b2Draw
which renders objects (body fixtures, particles, etc.) using DebugRenderer.
b2Draw
receives callbacks from b2World
when b2World::DrawDebugData()
is called. This class then in turn queues up those shapes in DebugRenderer for later rendering. This allows rendering to occur later in the render thread, and queuing to occur in the main thread, keeping debug shapes visually in sync with physics.
- Note
- It is expected that a valid Renderer be attached when b2World::DrawDebugData() is called, so that Renderer::getDebugRenderer() can be called.
LiquidFunDebugDraw::LiquidFunDebugDraw |
( |
| ) |
|
virtual void LiquidFunDebugDraw::DrawCircle |
( |
const b2Vec2 & |
center, |
|
|
float32 |
radius, |
|
|
const b2Color & |
color |
|
) |
| |
|
overridevirtual |
Draw a circle.
- Parameters
-
center | Center of the circle |
radius | Radius of the circle |
color | Color to draw the circle |
virtual void LiquidFunDebugDraw::DrawParticles |
( |
const b2Vec2 * |
centers, |
|
|
float32 |
radius, |
|
|
const b2ParticleColor * |
colors, |
|
|
int32 |
count |
|
) |
| |
|
overridevirtual |
Draw a list of particles as circles.
- Parameters
-
centers | List of particle centers |
radius | Radius of circles |
colors | List of particle colors |
count | Length of centers and colors |
virtual void LiquidFunDebugDraw::DrawPolygon |
( |
const b2Vec2 * |
vertices, |
|
|
int32 |
vertexCount, |
|
|
const b2Color & |
color |
|
) |
| |
|
overridevirtual |
Draw a closed polygon line.
- Parameters
-
vertices | List of vertices |
vertexCount | Length of list vertices |
color | Color to draw the polygon |
virtual void LiquidFunDebugDraw::DrawSegment |
( |
const b2Vec2 & |
p1, |
|
|
const b2Vec2 & |
p2, |
|
|
const b2Color & |
color |
|
) |
| |
|
overridevirtual |
Draw a line segment.
- Parameters
-
p1 | First end point |
p2 | Second end point |
color | Color to draw the line segment |
virtual void LiquidFunDebugDraw::DrawSolidCircle |
( |
const b2Vec2 & |
center, |
|
|
float32 |
radius, |
|
|
const b2Vec2 & |
axis, |
|
|
const b2Color & |
color |
|
) |
| |
|
overridevirtual |
Draw a filled circle.
- Parameters
-
center | Center of the circle |
radius | Radius of the circle |
axis | Rotational axis of the circle, to indicate rotation |
color | Color to fill the circle |
virtual void LiquidFunDebugDraw::DrawSolidPolygon |
( |
const b2Vec2 * |
vertices, |
|
|
int32 |
vertexCount, |
|
|
const b2Color & |
color |
|
) |
| |
|
overridevirtual |
Draw a filled polygon.
- Note
- The polygon is expected to be convex.
- Parameters
-
vertices | List of vertices |
vertexCount | Length of list vertices |
color | Color to fill the polygon |
virtual void LiquidFunDebugDraw::DrawTransform |
( |
const b2Transform & |
xf | ) |
|
|
overridevirtual |
Draw a two dimensional transform.
This method visualizes the transform by drawing two colored lines along the transform's x and y axes.
- Parameters
-