// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #if COMPILE_WITH_DEBUG_DRAW #include "Engine/Scripting/ScriptingType.h" #include "Engine/Core/Math/Color.h" #include "Engine/Core/Types/Span.h" struct RenderContext; class GPUTextureView; class GPUContext; class RenderTask; class SceneRenderTask; class Actor; struct Transform; /// /// The debug shapes rendering service. Not available in final game. For use only in the editor. /// API_CLASS(Static) class FLAXENGINE_API DebugDraw { DECLARE_SCRIPTING_TYPE_NO_SPAWN(DebugDraw); #if USE_EDITOR /// /// Allocates the context for Debug Drawing. Can be use to redirect debug shapes collecting to a separate container (instead of global state). /// /// The context object. Release it wil FreeContext. Returns null if failed. API_FUNCTION() static void* AllocateContext(); /// /// Frees the context for Debug Drawing. /// /// The context. API_FUNCTION() static void FreeContext(void* context); /// /// Updates the context for Debug Drawing. /// /// The context. /// The update delta time (in seconds). API_FUNCTION() static void UpdateContext(void* context, float deltaTime); /// /// Sets the context for Debug Drawing to a custom or null to use global default. /// /// The context or null. API_FUNCTION() static void SetContext(void* context); #endif /// /// Draws the collected debug shapes to the output. /// /// The rendering context. /// The rendering output surface handle. /// The custom depth texture used for depth test. Can be MSAA. Must match target surface size. /// True if perform manual depth test with scene depth buffer when rendering the primitives. Uses custom shader and the scene depth buffer. API_FUNCTION() static void Draw(API_PARAM(Ref) RenderContext& renderContext, GPUTextureView* target = nullptr, GPUTextureView* depthBuffer = nullptr, bool enableDepthTest = false); /// /// Draws the debug shapes for the given collection of selected actors and other scene actors debug shapes. /// /// The list of actors to draw. /// The size of the list of actors. /// True if draw all debug shapes from scenes too or false if draw just from specified actor list. API_FUNCTION() static void DrawActors(Actor** selectedActors, int32 selectedActorsCount, bool drawScenes); /// /// Draws the line in a direction. /// /// The origin of the line. /// The direction of the line. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawRay(const Vector3& origin, const Vector3& direction, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the line. /// /// The start point. /// The end point. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawLine(const Vector3& start, const Vector3& end, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the line. /// /// The start point. /// The end point. /// The color of the start point. /// The color of the end point. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawLine(const Vector3& start, const Vector3& end, const Color& startColor, const Color& endColor, float duration = 0.0f, bool depthTest = true); /// /// Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...). /// /// The list of vertices for lines (must have multiple of 2 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...). /// /// The list of vertices for lines (must have multiple of 2 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawLines(const Array& lines, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...). /// /// The list of vertices for lines (must have multiple of 2 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...). /// /// The list of vertices for lines (must have multiple of 2 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawLines(const Array& lines, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws a Bezier curve. /// /// The start point. /// The first control point. /// The second control point. /// The end point. /// The line color /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawBezier(const Vector3& p1, const Vector3& p2, const Vector3& p3, const Vector3& p4, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the circle. /// /// The center position. /// The normal vector direction. /// The radius. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawCircle(const Vector3& position, const Float3& normal, float radius, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangle. /// /// The first triangle vertex. /// The second triangle vertex. /// The third triangle vertex. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangle. /// /// The first triangle vertex. /// The second triangle vertex. /// The third triangle vertex. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Array& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Array& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The custom matrix used to transform all line vertices. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawWireTriangles(const Array& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawWireTriangles(const Array& vertices, const Array& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles. /// /// The triangle vertices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawWireTriangles(const Array& vertices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe triangles using the given index buffer. /// /// The triangle vertices list. /// The triangle indices list (must have multiple of 3 elements). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. static void DrawWireTriangles(const Array& vertices, const Array& indices, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe box. /// /// The box. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireBox(const BoundingBox& box, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe frustum. /// /// The frustum. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireFrustum(const BoundingFrustum& frustum, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe box. /// /// The box. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireBox(const OrientedBoundingBox& box, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe sphere. /// /// The sphere. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireSphere(const BoundingSphere& sphere, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the sphere. /// /// The sphere. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawSphere(const BoundingSphere& sphere, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the tube. /// /// The center position. /// The orientation. /// The radius. /// The length. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawTube(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe tube. /// /// The center position. /// The orientation. /// The radius. /// The length. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireTube(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the cylinder. /// /// The center position. /// The orientation. /// The radius. /// The height. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawCylinder(const Vector3& position, const Quaternion& orientation, float radius, float height, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe cylinder. /// /// The center position. /// The orientation. /// The radius. /// The height. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireCylinder(const Vector3& position, const Quaternion& orientation, float radius, float height, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the cone. /// /// The center position. /// The orientation. /// The radius. /// The angle (in radians) of the cone over the XY axis (cone forward is over X). /// The angle (in radians) of the cone over the XZ axis (cone forward is over X). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawCone(const Vector3& position, const Quaternion& orientation, float radius, float angleXY, float angleXZ, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe cone. /// /// The center position. /// The orientation. /// The radius. /// The angle (in radians) of the cone over the XY axis (cone forward is over X). /// The angle (in radians) of the cone over the XZ axis (cone forward is over X). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireCone(const Vector3& position, const Quaternion& orientation, float radius, float angleXY, float angleXZ, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the arc. /// /// The center position. /// The orientation. /// The radius. /// The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawArc(const Vector3& position, const Quaternion& orientation, float radius, float angle, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe arc. /// /// The center position. /// The orientation. /// The radius. /// The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireArc(const Vector3& position, const Quaternion& orientation, float radius, float angle, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the wireframe arrow. /// /// The arrow origin position. /// The orientation (defines the arrow direction). /// The arrow scale (used to adjust the arrow size). /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawWireArrow(const Vector3& position, const Quaternion& orientation, float scale, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the box. /// /// The box. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawBox(const BoundingBox& box, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the box. /// /// The box. /// The color. /// The duration (in seconds). Use 0 to draw it only once. /// If set to true depth test will be performed, otherwise depth will be ignored. API_FUNCTION() static void DrawBox(const OrientedBoundingBox& box, const Color& color, float duration = 0.0f, bool depthTest = true); /// /// Draws the text on a screen (2D). /// /// The text. /// The position of the text on the screen (in screen-space coordinates). /// The color. /// The font size. /// The duration (in seconds). Use 0 to draw it only once. API_FUNCTION() static void DrawText(const StringView& text, const Float2& position, const Color& color, int32 size = 20, float duration = 0.0f); /// /// Draws the text (3D) that automatically faces the camera. /// /// The text. /// The position of the text (world-space). /// The color. /// The font size. /// The duration (in seconds). Use 0 to draw it only once. /// The text scale. API_FUNCTION() static void DrawText(const StringView& text, const Vector3& position, const Color& color, int32 size = 32, float duration = 0.0f, float scale = 1.0f); /// /// Draws the text (3D). /// /// The text. /// The transformation of the text (world-space). /// The color. /// The font size. /// The duration (in seconds). Use 0 to draw it only once. API_FUNCTION() static void DrawText(const StringView& text, const Transform& transform, const Color& color, int32 size = 32, float duration = 0.0f); }; #define DEBUG_DRAW_RAY(origin, direction, color, duration, depthTest) DebugDraw::DrawRay(origin, direction, color, duration, depthTest) #define DEBUG_DRAW_LINE(start, end, color, duration, depthTest) DebugDraw::DrawLine(start, end, color, duration, depthTest) #define DEBUG_DRAW_LINES(lines, transform, color, duration, depthTest) DebugDraw::DrawLines(lines, transform, color, duration, depthTest) #define DEBUG_DRAW_BEZIER(p1, p2, p3, p4, color, duration, depthTest) DebugDraw::DrawBezier(p1, p2, p3, p4, color, duration, depthTest) #define DEBUG_DRAW_CIRCLE(position, normal, radius, color, duration, depthTest) DebugDraw::DrawCircle(position, normal, radius, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLE(v0, v1, v2, color, duration, depthTest) DebugDraw::DrawTriangle(v0, v1, v2, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES(vertices, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES_EX(vertices, indices, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, indices, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES_EX2(vertices, indices, transform, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, indices, transform, color, duration, depthTest) #define DEBUG_DRAW_SPHERE(sphere, color, duration, depthTest) DebugDraw::DrawSphere(sphere, color, duration, depthTest) #define DEBUG_DRAW_TUBE(position, orientation, radius, length, color, duration, depthTest) DebugDraw::DrawTube(position, orientation, radius, length, color, duration, depthTest) #define DEBUG_DRAW_BOX(box, color, duration, depthTest) DebugDraw::DrawBox(box, color, duration, depthTest) #define DEBUG_DRAW_CYLINDER(position, orientation, radius, height, color, duration, depthTest) DebugDraw::DrawCylinder(position, orientation, radius, height, color, duration, depthTest) #define DEBUG_DRAW_CONE(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) DebugDraw::DrawCone(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) #define DEBUG_DRAW_ARC(position, orientation, radius, angle, color, duration, depthTest) DebugDraw::DrawArc(position, orientation, radius, angle, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLE(v0, v1, v2, color, duration, depthTest) DebugDraw::DrawWireTriangle(v0, v1, v2, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLES(vertices, color, duration, depthTest) DebugDraw::DrawWireTriangles(vertices, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLES_EX(vertices, indices, color, duration, depthTest) DebugDraw::DrawWireTriangles(vertices, indices, color, duration, depthTest) #define DEBUG_DRAW_WIRE_BOX(box, color, duration, depthTest) DebugDraw::DrawWireBox(box, color, duration, depthTest) #define DEBUG_DRAW_WIRE_FRUSTUM(frustum, color, duration, depthTest) DebugDraw::DrawWireFrustum(frustum, color, duration, depthTest) #define DEBUG_DRAW_WIRE_SPHERE(sphere, color, duration, depthTest) DebugDraw::DrawWireSphere(sphere, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TUBE(position, orientation, radius, length, color, duration, depthTest) DebugDraw::DrawWireTube(position, orientation, radius, length, color, duration, depthTest) #define DEBUG_DRAW_WIRE_CYLINDER(position, orientation, radius, height, color, duration, depthTest) DebugDraw::DrawWireCylinder(position, orientation, radius, height, color, duration, depthTest) #define DEBUG_DRAW_WIRE_CONE(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) DebugDraw::DrawWireCone(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) #define DEBUG_DRAW_WIRE_ARC(position, orientation, radius, angle, color, duration, depthTest) DebugDraw::DrawWireArc(position, orientation, radius, angle, color, duration, depthTest) #define DEBUG_DRAW_WIRE_ARROW(position, orientation, scale, color, duration, depthTest) DebugDraw::DrawWireArrow(position, orientation, scale, color, duration, depthTest) #define DEBUG_DRAW_TEXT(text, position, color, size, duration) DebugDraw::DrawText(text, position, color, size, duration) #else #define DEBUG_DRAW_LINE(start, end, color, duration, depthTest) #define DEBUG_DRAW_LINES(lines, transform, color, duration, depthTest) #define DEBUG_DRAW_BEZIER(p1, p2, p3, p4, color, duration, depthTest) #define DEBUG_DRAW_CIRCLE(position, normal, radius, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLE(v0, v1, v2, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES(vertices, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES_EX(vertices, indices, color, duration, depthTest) #define DEBUG_DRAW_TRIANGLES_EX2(vertices, indices, transform, color, duration, depthTest) #define DEBUG_DRAW_SPHERE(sphere, color, duration, depthTest) #define DEBUG_DRAW_TUBE(position, orientation, radius, length, color, duration, depthTest) #define DEBUG_DRAW_BOX(box, color, duration, depthTest) #define DEBUG_DRAW_CYLINDER(position, orientation, radius, height, color, duration, depthTest) #define DEBUG_DRAW_CONE(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) #define DEBUG_DRAW_ARC(position, orientation, radius, angle, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLE(v0, v1, v2, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLES(vertices, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TRIANGLES_EX(vertices, indices, color, duration, depthTest) #define DEBUG_DRAW_WIRE_BOX(box, color, duration, depthTest) #define DEBUG_DRAW_WIRE_FRUSTUM(frustum, color, duration, depthTest) #define DEBUG_DRAW_WIRE_SPHERE(sphere, color, duration, depthTest) #define DEBUG_DRAW_WIRE_TUBE(position, orientation, radius, length, color, duration, depthTest) #define DEBUG_DRAW_WIRE_CYLINDER(position, orientation, radius, height, color, duration, depthTest) #define DEBUG_DRAW_WIRE_CONE(position, orientation, radius, angleXY, angleXZ, color, duration, depthTest) #define DEBUG_DRAW_WIRE_ARC(position, orientation, radius, angle, color, duration, depthTest) #define DEBUG_DRAW_WIRE_ARROW(position, orientation, scale, color, duration, depthTest) #define DEBUG_DRAW_TEXT(text, position, color, size, duration) #endif