29static const duReal DU_PI = 3.14159265358979323846;
98#if !DU_LARGE_WORLD_COORDINATES_DISABLED
100 virtual void vertex(
const float* pos,
unsigned int color)
final {}
109#if !DU_LARGE_WORLD_COORDINATES_DISABLED
111 virtual void vertex(
const float x,
const float y,
const float z,
unsigned int color)
final {}
120#if !DU_LARGE_WORLD_COORDINATES_DISABLED
122 virtual void vertex(
const float* pos,
unsigned int color,
const float*
uv)
final {}
131#if !DU_LARGE_WORLD_COORDINATES_DISABLED
133 virtual void vertex(
const float x,
const float y,
const float z,
unsigned int color,
const float u,
const float v)
final {}
142#if !DU_LARGE_WORLD_COORDINATES_DISABLED
144 virtual void text(
const float x,
const float y,
const float z,
const char*
text)
final {}
155 const unsigned int a = (
rgba & 0x000000ff);
156 const unsigned int b = (
rgba & 0x0000ff00);
157 const unsigned int g = (
rgba & 0x00ff0000);
158 const unsigned int r = (
rgba & 0xff000000);
159 return (r >> 24) | (g >> 8) | (b << 8) | a << 24;
162inline unsigned int duRGBA(
int r,
int g,
int b,
int a)
164 return ((
unsigned int)r) | ((
unsigned int)g << 8) | ((
unsigned int)b << 16) | ((
unsigned int)a << 24);
169 unsigned char r = (
unsigned char)(
fr*255.0f);
170 unsigned char g = (
unsigned char)(
fg*255.0f);
171 unsigned char b = (
unsigned char)(
fb*255.0f);
172 unsigned char a = (
unsigned char)(
fa*255.0f);
179inline unsigned int duMultCol(
const unsigned int col,
const unsigned int d)
181 const unsigned int r = col & 0xff;
182 const unsigned int g = (col >> 8) & 0xff;
183 const unsigned int b = (col >> 16) & 0xff;
184 const unsigned int a = (col >> 24) & 0xff;
185 return duRGBA((r*d) >> 8, (g*d) >> 8, (b*d) >> 8, a);
190 return ((col >> 1) & 0x007f7f7f) | (col & 0xff000000);
193inline unsigned int duLerpCol(
unsigned int ca,
unsigned int cb,
unsigned int u)
195 const unsigned int ra =
ca & 0xff;
196 const unsigned int ga = (
ca >> 8) & 0xff;
197 const unsigned int ba = (
ca >> 16) & 0xff;
198 const unsigned int aa = (
ca >> 24) & 0xff;
199 const unsigned int rb =
cb & 0xff;
200 const unsigned int gb = (
cb >> 8) & 0xff;
201 const unsigned int bb = (
cb >> 16) & 0xff;
202 const unsigned int ab = (
cb >> 24) & 0xff;
204 unsigned int r = (
ra*(255-u) +
rb*u)/255;
205 unsigned int g = (
ga*(255-u) +
gb*u)/255;
206 unsigned int b = (
ba*(255-u) +
bb*u)/255;
207 unsigned int a = (
aa*(255-u) +
ab*u)/255;
211inline unsigned int duTransCol(
unsigned int c,
unsigned int a)
213 return (a<<24) | (c & 0x00ffffff);
275 const int w,
const int h,
const duReal size,
276 const unsigned int col,
const float lineWidth);
297 const duReal h,
unsigned int col);
304 const duReal r,
unsigned int col);
307 const duReal size,
unsigned int col);
319 unsigned int* m_color;
327 void resize(
int cap);
335 virtual void vertex(
const duReal* pos,
unsigned int color);
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
double duReal
Definition DebugDrawLargeWorldCoordinates.h:13
void duAppendArrow(struct duDebugDraw *dd, const duReal x0, const duReal y0, const duReal z0, const duReal x1, const duReal y1, const duReal z1, const duReal as0, const duReal as1, unsigned int col)
Definition DebugDraw.cpp:535
float duSin(float x)
Definition DebugDraw.h:31
void duAppendBox(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, const unsigned int *fcol)
Definition DebugDraw.cpp:296
void duAppendArc(struct duDebugDraw *dd, const duReal x0, const duReal y0, const duReal z0, const duReal x1, const duReal y1, const duReal z1, const duReal h, const duReal as0, const duReal as1, unsigned int col)
Definition DebugDraw.cpp:448
void duAppendArcSegment(struct duDebugDraw *dd, const duReal xA0, const duReal yA0, const duReal zA0, const duReal xA1, const duReal yA1, const duReal zA1, const duReal xB0, const duReal yB0, const duReal zB0, const duReal xB1, const duReal yB1, const duReal zB1, const duReal h, unsigned int col)
Definition DebugDraw.cpp:490
void duDebugDrawCylinderWire(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:95
void duDebugDrawCross(struct duDebugDraw *dd, const duReal x, const duReal y, const duReal z, const duReal size, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:147
float duAbs(float x)
Definition DebugDraw.h:51
unsigned int duIntToCol(int i, int a)
Definition DebugDraw.cpp:38
float duCos(float x)
Definition DebugDraw.h:41
void duAppendCylinder(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col)
Definition DebugDraw.cpp:331
void duDebugDrawArc(struct duDebugDraw *dd, const duReal x0, const duReal y0, const duReal z0, const duReal x1, const duReal y1, const duReal z1, const duReal h, const duReal as0, const duReal as1, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:115
void duAppendBoxPoints(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col)
Definition DebugDraw.cpp:271
void duAppendCross(struct duDebugDraw *dd, const duReal x, const duReal y, const duReal z, const duReal size, unsigned int col)
Definition DebugDraw.cpp:577
void duDebugDrawArrow(struct duDebugDraw *dd, const duReal x0, const duReal y0, const duReal z0, const duReal x1, const duReal y1, const duReal z1, const duReal as0, const duReal as1, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:126
void duAppendCircle(struct duDebugDraw *dd, const duReal x, const duReal y, const duReal z, const duReal r, unsigned int col)
Definition DebugDraw.cpp:552
void duDebugDrawCylinder(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col)
Definition DebugDraw.cpp:167
unsigned int duRGBAf(float fr, float fg, float fb, float fa)
Definition DebugDraw.h:167
unsigned int duDarkenCol(unsigned int col)
Definition DebugDraw.h:188
unsigned int duTransCol(unsigned int c, unsigned int a)
Definition DebugDraw.h:211
void duAppendBoxWire(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col)
Definition DebugDraw.cpp:236
void duDebugDrawGridXZ(struct duDebugDraw *dd, const duReal ox, const duReal oy, const duReal oz, const int w, const int h, const duReal size, const unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:177
void duDebugDrawCircle(struct duDebugDraw *dd, const duReal x, const duReal y, const duReal z, const duReal r, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:137
void duDebugDrawBox(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, const unsigned int *fcol)
Definition DebugDraw.cpp:157
void duDebugDrawBoxWire(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col, const float lineWidth)
Definition DebugDraw.cpp:105
void duCalcBoxColors(unsigned int *colors, unsigned int colTop, unsigned int colSide)
Definition DebugDraw.cpp:83
void duAppendCylinderWire(struct duDebugDraw *dd, duReal minx, duReal miny, duReal minz, duReal maxx, duReal maxy, duReal maxz, unsigned int col)
Definition DebugDraw.cpp:198
duDebugDrawPrimitives
Definition DebugDraw.h:72
@ DU_DRAW_QUADS
Definition DebugDraw.h:76
@ DU_DRAW_LINES
Definition DebugDraw.h:74
@ DU_DRAW_TRIS
Definition DebugDraw.h:75
@ DU_DRAW_POINTS
Definition DebugDraw.h:73
float duSqrt(float x)
Definition DebugDraw.h:61
unsigned int duLerpCol(unsigned int ca, unsigned int cb, unsigned int u)
Definition DebugDraw.h:193
unsigned int duRGBA(unsigned int rgba)
Definition DebugDraw.h:153
unsigned int duMultCol(const unsigned int col, const unsigned int d)
Definition DebugDraw.h:179
Definition DebugDraw.h:317
virtual void depthMask(bool state)
Definition DebugDraw.cpp:631
virtual ~duDisplayList() override
Definition DebugDraw.cpp:603
void draw(struct duDebugDraw *dd)
Definition DebugDraw.cpp:664
void clear()
Definition DebugDraw.cpp:626
virtual void begin(duDebugDrawPrimitives prim, float size=1.0f)
Definition DebugDraw.cpp:636
virtual void end()
End drawing primitives.
Definition DebugDraw.cpp:660
virtual void vertex(const duReal x, const duReal y, const duReal z, unsigned int color)
Definition DebugDraw.cpp:643
float v
Definition radaudio_mdct.cpp:62
Definition DebugDraw.h:218
static unsigned int grey
Definition DebugDraw.h:240
static unsigned int pink
Definition DebugDraw.h:221
static unsigned int lime
Definition DebugDraw.h:231
static unsigned int black
Definition DebugDraw.h:242
static unsigned int brown
Definition DebugDraw.h:236
static unsigned int white
Definition DebugDraw.h:238
static unsigned int red
Definition DebugDraw.h:220
static unsigned int blue
Definition DebugDraw.h:225
static unsigned int amber
Definition DebugDraw.h:233
static unsigned int lightBlue
Definition DebugDraw.h:226
static unsigned int cyan
Definition DebugDraw.h:227
static unsigned int orange
Definition DebugDraw.h:234
static unsigned int teal
Definition DebugDraw.h:228
static unsigned int purple
Definition DebugDraw.h:222
static unsigned int green
Definition DebugDraw.h:229
static unsigned int lightGrey
Definition DebugDraw.h:239
static unsigned int lightGreen
Definition DebugDraw.h:230
static unsigned int orangeRed
Definition DebugDraw.h:235
static unsigned int deepPurple
Definition DebugDraw.h:223
static unsigned int darkGrey
Definition DebugDraw.h:241
static unsigned int yellow
Definition DebugDraw.h:232
static unsigned int indigo
Definition DebugDraw.h:224
Abstract debug draw interface.
Definition DebugDraw.h:81
virtual void vertex(const duReal x, const duReal y, const duReal z, unsigned int color, const duReal u, const duReal v)=0
virtual void vertex(const duReal *pos, unsigned int color, const duReal *uv)=0
virtual void vertex(const float *pos, unsigned int color) final
Definition DebugDraw.h:100
virtual void vertex(const duReal *pos, unsigned int color)=0
virtual void begin(duDebugDrawPrimitives prim, float size=1.0f)=0
virtual void text(const duReal x, const duReal y, const duReal z, const char *text)=0
virtual void vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v) final
Definition DebugDraw.h:133
virtual void text(const float x, const float y, const float z, const char *text) final
Definition DebugDraw.h:144
virtual void depthMask(bool state)=0
virtual void end()=0
End drawing primitives.
virtual void vertex(const float *pos, unsigned int color, const float *uv) final
Definition DebugDraw.h:122
virtual void vertex(const float x, const float y, const float z, unsigned int color) final
Definition DebugDraw.h:111
virtual void vertex(const duReal x, const duReal y, const duReal z, unsigned int color)=0
virtual NAVMESH_API ~duDebugDraw()=0
Definition DebugDraw.cpp:27
virtual void texture(bool state)=0