My Project
Public Types | Public Member Functions | List of all members
ParaEngine::IParaDebugDraw Class Referenceabstract

IParaDebugDraw draw interface draws line based primitives for debugging purposes. More...

#include <IParaDebugDraw.h>

Inheritance diagram for ParaEngine::IParaDebugDraw:
ParaEngine::IBatchedElementDraw ParaEngine::CBatchedElementDraw

Public Types

enum  DebugDrawModes {
  DDM_NoDebug =0, DDM_DrawWireframe = 1, DDM_DrawAabb =2, DDM_DrawFeaturesText =4,
  DDM_DrawContactPoints =8, DDM_NoDeactivation =16, DDM_NoHelpText = 32, DDM_DrawText =64,
  DDM_ProfileTimings = 128, DDM_EnableSatComparison = 256, DDM_DisableBulletLCP = 512, DDM_EnableCCD = 1024,
  DDM_DrawConstraints = (1 << 11), DDM_DrawConstraintLimits = (1 << 12), DDM_FastWireframe = (1<<13), DDM_MAX_DEBUG_DRAW_MODE
}
 

Public Member Functions

virtual void DrawLine (const PARAVECTOR3 &from, const PARAVECTOR3 &to, const PARAVECTOR3 &color)=0
 draw a line with a given color. More...
 
virtual void DrawPredefinedLines (const PARAVECTOR3 *lines, int nLineCount, const PARAVECTOR3 &color)=0
 draw multiple lines with a given color using the predefined index order. More...
 
virtual void DrawContactPoint (const PARAVECTOR3 &PointOnB, const PARAVECTOR3 &normalOnB, float distance, int lifeTime, const PARAVECTOR3 &color)=0
 draw a contact point with a given color. More...
 
virtual void ReportErrorWarning (const char *warningString)=0
 draw a contact point with a given color. More...
 
virtual void Draw3dText (const PARAVECTOR3 &location, const char *textString)=0
 draw a text with a given color. More...
 
virtual void SetRenderOffset (const PARAVECTOR3 &vOffset)=0
 set current render offset. More...
 
virtual PARAVECTOR3 GetRenderOffset ()=0
 get current render offset. More...
 
virtual void SetDebugDrawMode (int debugMode)=0
 bitwise of DebugDrawModes
 
virtual int GetDebugDrawMode ()=0
 bitwise of PhysicsDebugDrawModes
 
virtual void SetDefaultColor (const PARAVECTOR3 &color)=0
 get the current draw color. More...
 
virtual PARAVECTOR3 GetDefaultColor ()=0
 set the current draw color. More...
 

Detailed Description

IParaDebugDraw draw interface draws line based primitives for debugging purposes.

One can call any of its functions at any place at any time. The implementation of this class usually cache the primitives and draw them all in one batch after the main 3d scene is rendered.

Member Function Documentation

§ Draw3dText()

virtual void ParaEngine::IParaDebugDraw::Draw3dText ( const PARAVECTOR3 location,
const char *  textString 
)
pure virtual

draw a text with a given color.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ DrawContactPoint()

virtual void ParaEngine::IParaDebugDraw::DrawContactPoint ( const PARAVECTOR3 PointOnB,
const PARAVECTOR3 normalOnB,
float  distance,
int  lifeTime,
const PARAVECTOR3 color 
)
pure virtual

draw a contact point with a given color.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ DrawLine()

virtual void ParaEngine::IParaDebugDraw::DrawLine ( const PARAVECTOR3 from,
const PARAVECTOR3 to,
const PARAVECTOR3 color 
)
pure virtual

draw a line with a given color.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ DrawPredefinedLines()

virtual void ParaEngine::IParaDebugDraw::DrawPredefinedLines ( const PARAVECTOR3 lines,
int  nLineCount,
const PARAVECTOR3 color 
)
pure virtual

draw multiple lines with a given color using the predefined index order.

it can be used to render a quad(4 lines) or box(12 lines). 0,1,1,2,2,3,3,0, // bottom 4,5,5,6,6,7,7,4, // top 0,4,1,5,2,6,3,7, // sides

Parameters
linesvertex arrays
nLineCountit can be 4 or 12. the index order is given above.
colorcolor to draw the line.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ GetDefaultColor()

virtual PARAVECTOR3 ParaEngine::IParaDebugDraw::GetDefaultColor ( )
pure virtual

set the current draw color.

some object may reply on this value when drawing the primitives.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ GetRenderOffset()

virtual PARAVECTOR3 ParaEngine::IParaDebugDraw::GetRenderOffset ( )
pure virtual

get current render offset.

It only takes effect when calling one of the above Draw functions.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ ReportErrorWarning()

virtual void ParaEngine::IParaDebugDraw::ReportErrorWarning ( const char *  warningString)
pure virtual

draw a contact point with a given color.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ SetDefaultColor()

virtual void ParaEngine::IParaDebugDraw::SetDefaultColor ( const PARAVECTOR3 color)
pure virtual

get the current draw color.

some object may reply on this value when drawing the primitives.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.

§ SetRenderOffset()

virtual void ParaEngine::IParaDebugDraw::SetRenderOffset ( const PARAVECTOR3 vOffset)
pure virtual

set current render offset.

It only takes effect when calling one of the above Draw functions.

Implemented in ParaEngine::IBatchedElementDraw, and ParaEngine::CBatchedElementDraw.


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