6#ifndef DEBUGDRAW_H_HEADER_GUARD
7#define DEBUGDRAW_H_HEADER_GUARD
10#include <bx/allocator.h>
36 return _handle.
idx != UINT16_MAX;
45 return _handle.
idx != UINT16_MAX;
49void ddInit(bx::AllocatorI* _allocator = NULL);
63 uint32_t _numIndices = 0,
64 const void* _indices = NULL,
65 bool _index32 =
false);
80 void begin(uint16_t _viewId,
bool _depthTestLess =
true, bgfx::Encoder* _encoder = NULL);
95 void setState(
bool _depthTest,
bool _depthWrite,
bool _clockwise,
bool _alphaWrite =
false,
bool _alphaBlend =
true);
101 void setLod(uint8_t _lod);
107 void setStipple(
bool _stipple,
float _scale = 1.0f,
float _offset = 0.0f);
129 void moveTo(
float _x,
float _y,
float _z = 0.0f);
132 void moveTo(
const bx::Vec3& _pos);
135 void lineTo(
float _x,
float _y,
float _z = 0.0f);
138 void lineTo(
const bx::Vec3& _pos);
144 void draw(
const bx::Aabb& _aabb);
147 void draw(
const bx::Cylinder& _cylinder);
150 void draw(
const bx::Capsule& _capsule);
153 void draw(
const bx::Disk& _disk);
156 void draw(
const bx::Obb& _obb);
159 void draw(
const bx::Sphere& _sphere);
162 void draw(
const bx::Triangle& _triangle);
165 void draw(
const bx::Cone& _cone);
173 uint32_t _numIndices = 0,
174 const uint16_t* _indices = NULL);
179 uint32_t _numIndices = 0,
180 const uint16_t* _indices = NULL);
186 void drawArc(
Axis::Enum _axis,
float _x,
float _y,
float _z,
float _radius,
float _degrees);
189 void drawCircle(
const bx::Vec3& _normal,
const bx::Vec3& _center,
float _radius,
float _weight = 0.0f);
192 void drawCircle(
Axis::Enum _axis,
float _x,
float _y,
float _z,
float _radius,
float _weight = 0.0f);
195 void drawQuad(
const bx::Vec3& _normal,
const bx::Vec3& _center,
float _size);
198 void drawQuad(
SpriteHandle _handle,
const bx::Vec3& _normal,
const bx::Vec3& _center,
float _size);
201 void drawQuad(bgfx::TextureHandle _handle,
const bx::Vec3& _normal,
const bx::Vec3& _center,
float _size);
204 void drawCone(
const bx::Vec3& _from,
const bx::Vec3& _to,
float _radius);
207 void drawCylinder(
const bx::Vec3& _from,
const bx::Vec3& _to,
float _radius);
210 void drawCapsule(
const bx::Vec3& _from,
const bx::Vec3& _to,
float _radius);
218 float _thickness = 0.0f);
221 void drawGrid(
const bx::Vec3& _normal,
const bx::Vec3& _center, uint32_t _size = 20,
float _step = 1.0f);
224 void drawGrid(
Axis::Enum _axis,
const bx::Vec3& _center, uint32_t _size = 20,
float _step = 1.0f);
~DebugDrawEncoderScopePush()
DebugDrawEncoderScopePush(DebugDrawEncoder &_dde)
void draw(const bx::Aabb &_aabb)
void lineTo(float _x, float _y, float _z=0.0f)
void drawQuad(const bx::Vec3 &_normal, const bx::Vec3 &_center, float _size)
void drawCone(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
void setSpin(float _spin)
void drawCylinder(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
void setColor(uint32_t _abgr)
void drawAxis(float _x, float _y, float _z, float _len=1.0f, Axis::Enum _highlight=Axis::Count, float _thickness=0.0f)
void setWireframe(bool _wireframe)
void setTransform(const void *_mtx)
void begin(uint16_t _viewId, bool _depthTestLess=true, bgfx::Encoder *_encoder=NULL)
BX_ALIGN_DECL_CACHE_LINE(uint8_t) m_internal[50<< 10]
void drawGrid(const bx::Vec3 &_normal, const bx::Vec3 &_center, uint32_t _size=20, float _step=1.0f)
void setState(bool _depthTest, bool _depthWrite, bool _clockwise, bool _alphaWrite=false, bool _alphaBlend=true)
void pushTransform(const void *_mtx)
void drawArc(Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _degrees)
void drawCapsule(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
void drawOrb(float _x, float _y, float _z, float _radius, Axis::Enum _highlight=Axis::Count)
void drawTriList(uint32_t _numVertices, const DdVertex *_vertices, uint32_t _numIndices=0, const uint16_t *_indices=NULL)
void drawLineList(uint32_t _numVertices, const DdVertex *_vertices, uint32_t _numIndices=0, const uint16_t *_indices=NULL)
void drawFrustum(const void *_viewProj)
void pushProgram(bgfx::ProgramHandle _handle)
void moveTo(float _x, float _y, float _z=0.0f)
void drawCircle(const bx::Vec3 &_normal, const bx::Vec3 &_center, float _radius, float _weight=0.0f)
void setTranslate(float _x, float _y, float _z)
void setDepthTestLess(bool _depthTestLess)
void setStipple(bool _stipple, float _scale=1.0f, float _offset=0.0f)
void setLod(uint8_t _lod)
bool isValid(SpriteHandle _handle)
void ddInit(bx::AllocatorI *_allocator=NULL)
SpriteHandle ddCreateSprite(uint16_t _width, uint16_t _height, const void *_data)
GeometryHandle ddCreateGeometry(uint32_t _numVertices, const DdVertex *_vertices, uint32_t _numIndices=0, const void *_indices=NULL, bool _index32=false)
void ddDestroy(SpriteHandle _handle)