Bullet Collision Detection & Physics Library
Public Types | Public Member Functions | List of all members
btIDebugDraw Class Referenceabstract

The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations. More...

#include <btIDebugDraw.h>

Public Types

enum  DebugDrawModes {
  DBG_NoDebug =0,
  DBG_DrawWireframe = 1,
  DBG_DrawAabb =2,
  DBG_DrawFeaturesText =4,
  DBG_DrawContactPoints =8,
  DBG_NoDeactivation =16,
  DBG_NoHelpText = 32,
  DBG_DrawText =64,
  DBG_ProfileTimings = 128,
  DBG_EnableSatComparison = 256,
  DBG_DisableBulletLCP = 512,
  DBG_EnableCCD = 1024,
  DBG_DrawConstraints = (1 << 11),
  DBG_DrawConstraintLimits = (1 << 12),
  DBG_FastWireframe = (1<<13),
  DBG_DrawNormals = (1<<14),
  DBG_MAX_DEBUG_DRAW_MODE
}
 

Public Member Functions

virtual ~btIDebugDraw ()
 
virtual void drawLine (const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
 
virtual void drawLine (const btVector3 &from, const btVector3 &to, const btVector3 &fromColor, const btVector3 &toColor)
 
virtual void drawSphere (btScalar radius, const btTransform &transform, const btVector3 &color)
 
virtual void drawSphere (const btVector3 &p, btScalar radius, const btVector3 &color)
 
virtual void drawTriangle (const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &, const btVector3 &, const btVector3 &, const btVector3 &color, btScalar alpha)
 
virtual void drawTriangle (const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &color, btScalar)
 
virtual void drawContactPoint (const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
 
virtual void reportErrorWarning (const char *warningString)=0
 
virtual void draw3dText (const btVector3 &location, const char *textString)=0
 
virtual void setDebugMode (int debugMode)=0
 
virtual int getDebugMode () const =0
 
virtual void drawAabb (const btVector3 &from, const btVector3 &to, const btVector3 &color)
 
virtual void drawTransform (const btTransform &transform, btScalar orthoLen)
 
virtual void drawArc (const btVector3 &center, const btVector3 &normal, const btVector3 &axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, const btVector3 &color, bool drawSect, btScalar stepDegrees=btScalar(10.f))
 
virtual void drawSpherePatch (const btVector3 &center, const btVector3 &up, const btVector3 &axis, btScalar radius, btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3 &color, btScalar stepDegrees=btScalar(10.f))
 
virtual void drawBox (const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
 
virtual void drawBox (const btVector3 &bbMin, const btVector3 &bbMax, const btTransform &trans, const btVector3 &color)
 
virtual void drawCapsule (btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
 
virtual void drawCylinder (btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
 
virtual void drawCone (btScalar radius, btScalar height, int upAxis, const btTransform &transform, const btVector3 &color)
 
virtual void drawPlane (const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
 

Detailed Description

The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.

Typical use case: create a debug drawer object, and assign it to a btCollisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld. A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum. For color arguments the X,Y,Z components refer to Red, Green and Blue each in the range [0..1]

Definition at line 28 of file btIDebugDraw.h.

Member Enumeration Documentation

Enumerator
DBG_NoDebug 
DBG_DrawWireframe 
DBG_DrawAabb 
DBG_DrawFeaturesText 
DBG_DrawContactPoints 
DBG_NoDeactivation 
DBG_NoHelpText 
DBG_DrawText 
DBG_ProfileTimings 
DBG_EnableSatComparison 
DBG_DisableBulletLCP 
DBG_EnableCCD 
DBG_DrawConstraints 
DBG_DrawConstraintLimits 
DBG_FastWireframe 
DBG_DrawNormals 
DBG_MAX_DEBUG_DRAW_MODE 

Definition at line 32 of file btIDebugDraw.h.

Constructor & Destructor Documentation

virtual btIDebugDraw::~btIDebugDraw ( )
inlinevirtual

Definition at line 53 of file btIDebugDraw.h.

Member Function Documentation

virtual void btIDebugDraw::draw3dText ( const btVector3 location,
const char *  textString 
)
pure virtual
virtual void btIDebugDraw::drawAabb ( const btVector3 from,
const btVector3 to,
const btVector3 color 
)
inlinevirtual

Definition at line 119 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawArc ( const btVector3 center,
const btVector3 normal,
const btVector3 axis,
btScalar  radiusA,
btScalar  radiusB,
btScalar  minAngle,
btScalar  maxAngle,
const btVector3 color,
bool  drawSect,
btScalar  stepDegrees = btScalar(10.f) 
)
inlinevirtual

Definition at line 156 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawBox ( const btVector3 bbMin,
const btVector3 bbMax,
const btVector3 color 
)
inlinevirtual

Definition at line 284 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawBox ( const btVector3 bbMin,
const btVector3 bbMax,
const btTransform trans,
const btVector3 color 
)
inlinevirtual

Definition at line 299 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawCapsule ( btScalar  radius,
btScalar  halfHeight,
int  upAxis,
const btTransform transform,
const btVector3 color 
)
inlinevirtual

Definition at line 315 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawCone ( btScalar  radius,
btScalar  height,
int  upAxis,
const btTransform transform,
const btVector3 color 
)
inlinevirtual

Definition at line 377 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawContactPoint ( const btVector3 PointOnB,
const btVector3 normalOnB,
btScalar  distance,
int  lifeTime,
const btVector3 color 
)
pure virtual
virtual void btIDebugDraw::drawCylinder ( btScalar  radius,
btScalar  halfHeight,
int  upAxis,
const btTransform transform,
const btVector3 color 
)
inlinevirtual

Definition at line 358 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawLine ( const btVector3 from,
const btVector3 to,
const btVector3 color 
)
pure virtual
virtual void btIDebugDraw::drawLine ( const btVector3 from,
const btVector3 to,
const btVector3 fromColor,
const btVector3 toColor 
)
inlinevirtual

Definition at line 57 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawPlane ( const btVector3 planeNormal,
btScalar  planeConst,
const btTransform transform,
const btVector3 color 
)
inlinevirtual

Definition at line 402 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawSphere ( btScalar  radius,
const btTransform transform,
const btVector3 color 
)
inlinevirtual

Definition at line 63 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawSphere ( const btVector3 p,
btScalar  radius,
const btVector3 color 
)
inlinevirtual

Definition at line 90 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawSpherePatch ( const btVector3 center,
const btVector3 up,
const btVector3 axis,
btScalar  radius,
btScalar  minTh,
btScalar  maxTh,
btScalar  minPs,
btScalar  maxPs,
const btVector3 color,
btScalar  stepDegrees = btScalar(10.f) 
)
inlinevirtual

Definition at line 181 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawTransform ( const btTransform transform,
btScalar  orthoLen 
)
inlinevirtual

Definition at line 148 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawTriangle ( const btVector3 v0,
const btVector3 v1,
const btVector3 v2,
const btVector3 ,
const btVector3 ,
const btVector3 ,
const btVector3 color,
btScalar  alpha 
)
inlinevirtual

Definition at line 98 of file btIDebugDraw.h.

virtual void btIDebugDraw::drawTriangle ( const btVector3 v0,
const btVector3 v1,
const btVector3 v2,
const btVector3 color,
btScalar   
)
inlinevirtual

Definition at line 102 of file btIDebugDraw.h.

virtual int btIDebugDraw::getDebugMode ( ) const
pure virtual
virtual void btIDebugDraw::reportErrorWarning ( const char *  warningString)
pure virtual
virtual void btIDebugDraw::setDebugMode ( int  debugMode)
pure virtual

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