Torque3D Documentation / _generateds / duDebugDrawTorque

duDebugDrawTorque

Engine/source/navigation/duDebugDrawTorque.h

Implements the duDebugDraw interface in Torque.

More...

Classes:

Public Functions

begin(duDebugDrawPrimitives prim, float size)

Begin drawing primitives.

beginGroup(U32 group)

All new buffers go into this group.

Stop the colour override.

Delete buffered primitive.

depthMask(bool state)

Enable/disable Z read.

end()

End drawing primitives.

overrideColor(unsigned int col)

Special colour overwrite for when I get picky about the colours Mikko chose.

Render buffered primitive.

Render buffered primitives in a group.

texture(bool state)

Enable/disable texturing. Not used.

vertex(const float * pos, unsigned int color)

Submit a vertex.

vertex(const float * pos, unsigned int color, const float * uv)

Submit a vertex.

vertex(const float x, const float y, const float z, unsigned int color)

Submit a vertex.

vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v)

Submit a vertex.

Private Functions

_vertex(const float x, const float y, const float z, unsigned int color)

Push a vertex onto the buffer.

renderBuffer(Buffer & b)

Detailed Description

Implements the duDebugDraw interface in Torque.

This class uses the primitive builder (gfx/primBuild.h) to render navmeshes and other Recast data.

To facilitate the primbuilder's requirement to know the number of vertices to render beforehand, this class stores all vertices in a buffer of its own, then passes on that known-size buffer. This means that you only need to call the duDebugDraw functions when your data changes. At other times, you can cache the duDebugDrawTorque object and call its render() method, which actually renders its buffered data.

Private Attributes

Vector< Buffer > mBuffers 
U32 mCurrColor 
GFXStateBlockDesc mDesc 
U32 mGroup 
bool mOverride 
U32 mOverrideColor 
U32 mPrimType 
bool mQuadsMode 
F32 mStore [3][3]
U32 mVertCount 

Public Functions

duDebugDrawTorque()

~duDebugDrawTorque()

begin(duDebugDrawPrimitives prim, float size)

Begin drawing primitives.

Parameters:

prim

[in] primitive type to draw, one of rcDebugDrawPrimitives.

size

[in] size of a primitive, applies to point size and line width only.

beginGroup(U32 group)

All new buffers go into this group.

cancelOverride()

Stop the colour override.

clear()

Delete buffered primitive.

depthMask(bool state)

Enable/disable Z read.

end()

End drawing primitives.

overrideColor(unsigned int col)

Special colour overwrite for when I get picky about the colours Mikko chose.

render()

Render buffered primitive.

renderGroup(U32 group)

Render buffered primitives in a group.

texture(bool state)

Enable/disable texturing. Not used.

vertex(const float * pos, unsigned int color)

Submit a vertex.

Parameters:

pos

[in] position of the verts.

color

[in] color of the verts.

vertex(const float * pos, unsigned int color, const float * uv)

Submit a vertex.

Parameters:

pos

[in] position of the verts.

color

[in] color of the verts.

vertex(const float x, const float y, const float z, unsigned int color)

Submit a vertex.

Parameters:

z

[in] position of the verts.

color

[in] color of the verts.

vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v)

Submit a vertex.

Parameters:

z

[in] position of the verts.

color

[in] color of the verts.

Private Functions

_vertex(const float x, const float y, const float z, unsigned int color)

Push a vertex onto the buffer.

renderBuffer(Buffer & b)