b2DebugDraw Class Reference

#include <b2WorldCallbacks.h>

List of all members.

Public Types

enum  {
  e_shapeBit = 0x0001, e_jointBit = 0x0002, e_aabbBit = 0x0004, e_pairBit = 0x0008,
  e_centerOfMassBit = 0x0010
}

Public Member Functions

 b2DebugDraw ()
virtual ~b2DebugDraw ()
void SetFlags (uint32 flags)
 Set the drawing flags.
uint32 GetFlags () const
 Get the drawing flags.
void AppendFlags (uint32 flags)
 Append flags to the current flags.
void ClearFlags (uint32 flags)
 Clear flags from the current flags.
virtual void DrawPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color)=0
 Draw a closed polygon provided in CCW order.
virtual void DrawSolidPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color)=0
 Draw a solid closed polygon provided in CCW order.
virtual void DrawCircle (const b2Vec2 ¢er, float32 radius, const b2Color &color)=0
 Draw a circle.
virtual void DrawSolidCircle (const b2Vec2 ¢er, float32 radius, const b2Vec2 &axis, const b2Color &color)=0
 Draw a solid circle.
virtual void DrawSegment (const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color)=0
 Draw a line segment.
virtual void DrawTransform (const b2Transform &xf)=0

Protected Attributes

uint32 m_drawFlags

Detailed Description

Implement and register this class with a b2World to provide debug drawing of physics entities in your game.


Member Enumeration Documentation

anonymous enum
Enumerator:
e_shapeBit 

draw shapes

e_jointBit 

draw joint connections

e_aabbBit 

draw axis aligned bounding boxes

e_pairBit 

draw broad-phase pairs

e_centerOfMassBit 

draw center of mass frame


Constructor & Destructor Documentation

b2DebugDraw::b2DebugDraw (  ) 
virtual b2DebugDraw::~b2DebugDraw (  )  [inline, virtual]

Member Function Documentation

void b2DebugDraw::AppendFlags ( uint32  flags  ) 

Append flags to the current flags.

void b2DebugDraw::ClearFlags ( uint32  flags  ) 

Clear flags from the current flags.

virtual void b2DebugDraw::DrawCircle ( const b2Vec2 center,
float32  radius,
const b2Color color 
) [pure virtual]

Draw a circle.

virtual void b2DebugDraw::DrawPolygon ( const b2Vec2 vertices,
int32  vertexCount,
const b2Color color 
) [pure virtual]

Draw a closed polygon provided in CCW order.

virtual void b2DebugDraw::DrawSegment ( const b2Vec2 p1,
const b2Vec2 p2,
const b2Color color 
) [pure virtual]

Draw a line segment.

virtual void b2DebugDraw::DrawSolidCircle ( const b2Vec2 center,
float32  radius,
const b2Vec2 axis,
const b2Color color 
) [pure virtual]

Draw a solid circle.

virtual void b2DebugDraw::DrawSolidPolygon ( const b2Vec2 vertices,
int32  vertexCount,
const b2Color color 
) [pure virtual]

Draw a solid closed polygon provided in CCW order.

virtual void b2DebugDraw::DrawTransform ( const b2Transform xf  )  [pure virtual]

Draw a transform. Choose your own length scale.

Parameters:
xf a transform.
uint32 b2DebugDraw::GetFlags (  )  const

Get the drawing flags.

void b2DebugDraw::SetFlags ( uint32  flags  ) 

Set the drawing flags.


Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Sat Apr 3 18:18:09 2010 for Box2D by  doxygen 1.6.3