Public Member Functions | Public Attributes | List of all members
DebugDraw Class Reference

#include <draw.h>

Inheritance diagram for DebugDraw:
Inheritance graph
[legend]

Public Member Functions

void Create ()
 
 DebugDraw ()
 
void Destroy ()
 
void DrawAABB (b2AABB *aabb, const b2Color &color)
 
void DrawCircle (const b2Vec2 &center, float radius, const b2Color &color) override
 Draw a circle. More...
 
void DrawPoint (const b2Vec2 &p, float size, const b2Color &color) override
 Draw a point. More...
 
void DrawPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override
 Draw a closed polygon provided in CCW order. More...
 
void DrawSegment (const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color) override
 Draw a line segment. More...
 
void DrawSolidCircle (const b2Vec2 &center, float radius, const b2Vec2 &axis, const b2Color &color) override
 Draw a solid circle. More...
 
void DrawSolidPolygon (const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override
 Draw a solid closed polygon provided in CCW order. More...
 
void DrawString (int x, int y, const char *string,...)
 
void DrawString (const b2Vec2 &p, const char *string,...)
 
void DrawTransform (const b2Transform &xf) override
 
void Flush ()
 
 ~DebugDraw ()
 
- Public Member Functions inherited from b2Draw
void AppendFlags (uint32 flags)
 Append flags to the current flags. More...
 
 b2Draw ()
 
void ClearFlags (uint32 flags)
 Clear flags from the current flags. More...
 
uint32 GetFlags () const
 Get the drawing flags. More...
 
void SetFlags (uint32 flags)
 Set the drawing flags. More...
 
virtual ~b2Draw ()
 

Public Attributes

GLRenderLinesm_lines
 
GLRenderPointsm_points
 
bool m_showUI
 
GLRenderTrianglesm_triangles
 

Additional Inherited Members

- Public Types inherited from b2Draw
enum  {
  e_shapeBit = 0x0001, e_jointBit = 0x0002, e_aabbBit = 0x0004, e_pairBit = 0x0008,
  e_centerOfMassBit = 0x0010
}
 
- Protected Attributes inherited from b2Draw
uint32 m_drawFlags
 

Detailed Description

Definition at line 61 of file draw.h.

Constructor & Destructor Documentation

◆ DebugDraw()

DebugDraw::DebugDraw ( )

Definition at line 595 of file draw.cpp.

◆ ~DebugDraw()

DebugDraw::~DebugDraw ( )

Definition at line 604 of file draw.cpp.

Member Function Documentation

◆ Create()

void DebugDraw::Create ( )

Definition at line 612 of file draw.cpp.

◆ Destroy()

void DebugDraw::Destroy ( )

Definition at line 623 of file draw.cpp.

◆ DrawAABB()

void DebugDraw::DrawAABB ( b2AABB aabb,
const b2Color color 
)

Definition at line 803 of file draw.cpp.

◆ DrawCircle()

void DebugDraw::DrawCircle ( const b2Vec2 center,
float  radius,
const b2Color color 
)
overridevirtual

Draw a circle.

Implements b2Draw.

Definition at line 674 of file draw.cpp.

◆ DrawPoint()

void DebugDraw::DrawPoint ( const b2Vec2 p,
float  size,
const b2Color color 
)
overridevirtual

Draw a point.

Implements b2Draw.

Definition at line 766 of file draw.cpp.

◆ DrawPolygon()

void DebugDraw::DrawPolygon ( const b2Vec2 vertices,
int32  vertexCount,
const b2Color color 
)
overridevirtual

Draw a closed polygon provided in CCW order.

Implements b2Draw.

Definition at line 639 of file draw.cpp.

◆ DrawSegment()

void DebugDraw::DrawSegment ( const b2Vec2 p1,
const b2Vec2 p2,
const b2Color color 
)
overridevirtual

Draw a line segment.

Implements b2Draw.

Definition at line 742 of file draw.cpp.

◆ DrawSolidCircle()

void DebugDraw::DrawSolidCircle ( const b2Vec2 center,
float  radius,
const b2Vec2 axis,
const b2Color color 
)
overridevirtual

Draw a solid circle.

Implements b2Draw.

Definition at line 697 of file draw.cpp.

◆ DrawSolidPolygon()

void DebugDraw::DrawSolidPolygon ( const b2Vec2 vertices,
int32  vertexCount,
const b2Color color 
)
overridevirtual

Draw a solid closed polygon provided in CCW order.

Implements b2Draw.

Definition at line 652 of file draw.cpp.

◆ DrawString() [1/2]

void DebugDraw::DrawString ( int  x,
int  y,
const char *  string,
  ... 
)

Definition at line 772 of file draw.cpp.

◆ DrawString() [2/2]

void DebugDraw::DrawString ( const b2Vec2 p,
const char *  string,
  ... 
)

Definition at line 789 of file draw.cpp.

◆ DrawTransform()

void DebugDraw::DrawTransform ( const b2Transform xf)
overridevirtual

Draw a transform. Choose your own length scale.

Parameters
xfa transform.

Implements b2Draw.

Definition at line 749 of file draw.cpp.

◆ Flush()

void DebugDraw::Flush ( )

Definition at line 824 of file draw.cpp.

Member Data Documentation

◆ m_lines

GLRenderLines* DebugDraw::m_lines

Definition at line 94 of file draw.h.

◆ m_points

GLRenderPoints* DebugDraw::m_points

Definition at line 93 of file draw.h.

◆ m_showUI

bool DebugDraw::m_showUI

Definition at line 92 of file draw.h.

◆ m_triangles

GLRenderTriangles* DebugDraw::m_triangles

Definition at line 95 of file draw.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22