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

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

#include <IBatchedElementDraw.h>

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

Public Types

enum  BatchDrawModes {
  BDM_NoDebug =0, BDM_DrawWireframe = 1, BDM_DrawAabb =2, BDM_DrawFeaturesText =4,
  BDM_DrawContactPoints =8, BDM_NoDeactivation =16, BDM_NoHelpText = 32, BDM_DrawText =64,
  BDM_ProfileTimings = 128, BDM_EnableSatComparison = 256, BDM_DisableBulletLCP = 512, BDM_EnableCCD = 1024,
  BDM_DrawConstraints = (1 << 11), BDM_DrawConstraintLimits = (1 << 12), BDM_FastWireframe = (1<<13), BDM_MAX_DRAW_MODE
}
 
- Public Types inherited from ParaEngine::IParaDebugDraw
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...
 
virtual void AddThickLine (const PARAVECTOR3 &from, const PARAVECTOR3 &to, const PARAVECTOR4 &color, float fThickness=0.f, float DepthBias=0.f)=0
 draw line with thickness More...
 
virtual void AddThickLines (const PARAVECTOR3 *points, int nPointCount, const PARAVECTOR4 &color, float fThickness=0.f, float DepthBias=0.f)=0
 nPointCount-1 lines segment is drawn
 
virtual void AddParticle (CParticleElement *particle)=0
 add a particle 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

§ AddParticle()

virtual void ParaEngine::IBatchedElementDraw::AddParticle ( CParticleElement particle)
pure virtual

add a particle

Parameters
particlethe pointer must be valid until the end of the frame.

Implemented in ParaEngine::CBatchedElementDraw.

§ AddThickLine()

virtual void ParaEngine::IBatchedElementDraw::AddThickLine ( const PARAVECTOR3 from,
const PARAVECTOR3 to,
const PARAVECTOR4 color,
float  fThickness = 0.f,
float  DepthBias = 0.f 
)
pure virtual

draw line with thickness

Parameters
thicknessNegative thickness means that thickness is calculated in screen space, positive thickness should be used for world space thickness.

Implemented in ParaEngine::CBatchedElementDraw.

§ Draw3dText()

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

draw a text with a given color.

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ DrawContactPoint()

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

draw a contact point with a given color.

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ DrawLine()

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

draw a line with a given color.

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ DrawPredefinedLines()

virtual void ParaEngine::IBatchedElementDraw::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.

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ GetDefaultColor()

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

set the current draw color.

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

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ GetRenderOffset()

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

get current render offset.

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

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ ReportErrorWarning()

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

draw a contact point with a given color.

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ SetDefaultColor()

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

get the current draw color.

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

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.

§ SetRenderOffset()

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

set current render offset.

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

Implements ParaEngine::IParaDebugDraw.

Implemented in ParaEngine::CBatchedElementDraw.


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