From 3bfa37019e2be364d5eff59ba891135832ca8726 Mon Sep 17 00:00:00 2001
From: NoriteSC <53096989+NoriteSC@users.noreply.github.com>
Date: Tue, 12 Sep 2023 10:59:07 +0200
Subject: [PATCH 001/139] DebugDraw extra
fixes
ray direction was dictating the length of ray
now ray is normalized and multiplied by length
added default vaule for
Color& color to be Color::White
[info] c# because
Color color = Color.White
is not valid think to do on c# side the default value is not genereted
[to do] generate extra overload binding in c#
---
Source/Engine/Debug/DebugDraw.cpp | 9 +++++++--
Source/Engine/Debug/DebugDraw.h | 13 ++++++++++++-
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Source/Engine/Debug/DebugDraw.cpp b/Source/Engine/Debug/DebugDraw.cpp
index e8489f5b5..ccd247674 100644
--- a/Source/Engine/Debug/DebugDraw.cpp
+++ b/Source/Engine/Debug/DebugDraw.cpp
@@ -920,9 +920,14 @@ void DebugDraw::DrawActors(Actor** selectedActors, int32 selectedActorsCount, bo
}
}
-void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, const Color& color, float duration, bool depthTest)
+void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, Color& color, float length, float duration, bool depthTest)
{
- DrawLine(origin, origin + direction, color, duration, depthTest);
+ DrawLine(origin, origin + (direction.GetNormalized() * length), color, duration, depthTest);
+}
+
+void DebugDraw::DrawRay(const Ray& ray, Color& color, float length, float duration, bool depthTest)
+{
+ DrawLine(ray.Position, ray.Position + (ray.Direction.GetNormalized() * length), color, duration, depthTest);
}
void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& color, float duration, bool depthTest)
diff --git a/Source/Engine/Debug/DebugDraw.h b/Source/Engine/Debug/DebugDraw.h
index a4f69678a..5a811be7e 100644
--- a/Source/Engine/Debug/DebugDraw.h
+++ b/Source/Engine/Debug/DebugDraw.h
@@ -75,9 +75,20 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// The origin of the line.
/// The direction of the line.
/// The color.
+ /// The length of the ray.
/// 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);
+ API_FUNCTION() static void DrawRay(const Vector3& origin, const Vector3& direction, Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
+
+ ///
+ /// Draws the line in a direction.
+ ///
+ /// The ray.
+ /// The color.
+ /// The length of the ray.
+ /// 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 Ray& ray, Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
///
/// Draws the line.
From 78ffcc8ae5781d1b6171fbfd2921dc8a844f8a0f Mon Sep 17 00:00:00 2001
From: NoriteSC <53096989+NoriteSC@users.noreply.github.com>
Date: Tue, 12 Sep 2023 11:06:46 +0200
Subject: [PATCH 002/139] added other defaults
---
Source/Engine/Debug/DebugDraw.h | 104 ++++++++++++++++----------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/Source/Engine/Debug/DebugDraw.h b/Source/Engine/Debug/DebugDraw.h
index 5a811be7e..5bd51a578 100644
--- a/Source/Engine/Debug/DebugDraw.h
+++ b/Source/Engine/Debug/DebugDraw.h
@@ -98,7 +98,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawLine(const Vector3& start, const Vector3& end, Color& color = Color::White, 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,...).
@@ -108,7 +108,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, Color& color = Color::White, 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,...).
@@ -118,7 +118,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawLines(const Array& lines, const Matrix& transform, Color& color = Color::White, 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,...).
@@ -128,7 +128,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, Color& color = Color::White, 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,...).
@@ -138,7 +138,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawLines(const Array& lines, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws a Bezier curve.
@@ -150,7 +150,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawBezier(const Vector3& p1, const Vector3& p2, const Vector3& p3, const Vector3& p4, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the circle.
@@ -161,7 +161,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawCircle(const Vector3& position, const Float3& normal, float radius, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangle.
@@ -172,7 +172,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangle.
@@ -183,7 +183,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -192,7 +192,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -202,7 +202,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -211,7 +211,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -221,7 +221,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -231,7 +231,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -242,7 +242,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -252,7 +252,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Array& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -263,7 +263,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -272,7 +272,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -282,7 +282,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -291,7 +291,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -301,7 +301,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -311,7 +311,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -322,7 +322,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -332,7 +332,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Array& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -343,7 +343,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -352,7 +352,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -361,7 +361,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawWireTriangles(const Array& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -371,7 +371,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -381,7 +381,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawWireTriangles(const Array& vertices, const Array& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -390,7 +390,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -399,7 +399,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawWireTriangles(const Array& vertices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -409,7 +409,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -419,7 +419,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ static void DrawWireTriangles(const Array& vertices, const Array& indices, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe box.
@@ -428,7 +428,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireBox(const BoundingBox& box, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe frustum.
@@ -437,7 +437,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireFrustum(const BoundingFrustum& frustum, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe box.
@@ -446,7 +446,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireBox(const OrientedBoundingBox& box, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe sphere.
@@ -455,7 +455,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireSphere(const BoundingSphere& sphere, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the sphere.
@@ -464,7 +464,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawSphere(const BoundingSphere& sphere, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the tube.
@@ -476,7 +476,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawTube(const Vector3& position, const Quaternion& orientation, float radius, float length, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe tube.
@@ -488,7 +488,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireTube(const Vector3& position, const Quaternion& orientation, float radius, float length, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the cylinder.
@@ -500,7 +500,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawCylinder(const Vector3& position, const Quaternion& orientation, float radius, float height, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe cylinder.
@@ -512,7 +512,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireCylinder(const Vector3& position, const Quaternion& orientation, float radius, float height, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the cone.
@@ -525,7 +525,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawCone(const Vector3& position, const Quaternion& orientation, float radius, float angleXY, float angleXZ, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe cone.
@@ -538,7 +538,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireCone(const Vector3& position, const Quaternion& orientation, float radius, float angleXY, float angleXZ, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the arc.
@@ -550,7 +550,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawArc(const Vector3& position, const Quaternion& orientation, float radius, float angle, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe arc.
@@ -562,7 +562,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireArc(const Vector3& position, const Quaternion& orientation, float radius, float angle, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe arrow.
@@ -573,7 +573,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawWireArrow(const Vector3& position, const Quaternion& orientation, float scale, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the box.
@@ -582,7 +582,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawBox(const BoundingBox& box, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the box.
@@ -591,7 +591,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawBox(const OrientedBoundingBox& box, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the text on a screen (2D).
@@ -601,7 +601,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawText(const StringView& text, const Float2& position, Color& color = Color::White, int32 size = 20, float duration = 0.0f);
///
/// Draws the text (3D) that automatically faces the camera.
@@ -612,7 +612,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawText(const StringView& text, const Vector3& position, Color& color = Color::White, int32 size = 32, float duration = 0.0f, float scale = 1.0f);
///
/// Draws the text (3D).
@@ -622,7 +622,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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);
+ API_FUNCTION() static void DrawText(const StringView& text, const Transform& transform, Color& color = Color::White, int32 size = 32, float duration = 0.0f);
};
#define DEBUG_DRAW_RAY(origin, direction, color, duration, depthTest) DebugDraw::DrawRay(origin, direction, color, duration, depthTest)
From f11ea025506967f0dacd05e9ded8daac16a39ba6 Mon Sep 17 00:00:00 2001
From: NoriteSC <53096989+NoriteSC@users.noreply.github.com>
Date: Tue, 12 Sep 2023 11:08:47 +0200
Subject: [PATCH 003/139] forgot about const :sweat_smile:
---
Source/Engine/Debug/DebugDraw.h | 108 ++++++++++++++++----------------
1 file changed, 54 insertions(+), 54 deletions(-)
diff --git a/Source/Engine/Debug/DebugDraw.h b/Source/Engine/Debug/DebugDraw.h
index 5bd51a578..b5af321c7 100644
--- a/Source/Engine/Debug/DebugDraw.h
+++ b/Source/Engine/Debug/DebugDraw.h
@@ -78,7 +78,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// The length of the ray.
/// 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, Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawRay(const Vector3& origin, const Vector3& direction, const Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
///
/// Draws the line in a direction.
@@ -88,7 +88,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// The length of the ray.
/// 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 Ray& ray, Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawRay(const Ray& ray,const Color& color = Color::White, float length = 3.402823466e+38f, float duration = 0.0f, bool depthTest = true);
///
/// Draws the line.
@@ -98,7 +98,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawLine(const Vector3& start, const Vector3& end, const Color& color = Color::White, 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,...).
@@ -108,7 +108,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, const Color& color = Color::White, 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,...).
@@ -118,7 +118,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawLines(const Array& lines, const Matrix& transform, const Color& color = Color::White, 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,...).
@@ -128,7 +128,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawLines(const Span& lines, const Matrix& transform, const Color& color = Color::White, 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,...).
@@ -138,7 +138,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawLines(const Array& lines, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws a Bezier curve.
@@ -150,7 +150,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawBezier(const Vector3& p1, const Vector3& p2, const Vector3& p3, const Vector3& p4, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the circle.
@@ -161,7 +161,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawCircle(const Vector3& position, const Float3& normal, float radius, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangle.
@@ -172,7 +172,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangle.
@@ -183,7 +183,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangle(const Vector3& v0, const Vector3& v1, const Vector3& v2, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -192,7 +192,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -202,7 +202,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -211,7 +211,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -221,7 +221,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -231,7 +231,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -242,7 +242,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -252,7 +252,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -263,7 +263,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -272,7 +272,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -282,7 +282,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -291,7 +291,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles.
@@ -301,7 +301,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -311,7 +311,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -322,7 +322,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTriangles(const Span& vertices, const Span& indices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -332,7 +332,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the triangles using the given index buffer.
@@ -343,7 +343,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawTriangles(const Array& vertices, const Array& indices, const Matrix& transform, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -352,7 +352,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -361,7 +361,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawWireTriangles(const Array& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -371,7 +371,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -381,7 +381,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawWireTriangles(const Array& vertices, const Array& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -390,7 +390,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles.
@@ -399,7 +399,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawWireTriangles(const Array& vertices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -409,7 +409,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTriangles(const Span& vertices, const Span& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe triangles using the given index buffer.
@@ -419,7 +419,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ static void DrawWireTriangles(const Array& vertices, const Array& indices, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe box.
@@ -428,7 +428,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireBox(const BoundingBox& box, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe frustum.
@@ -437,7 +437,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireFrustum(const BoundingFrustum& frustum, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe box.
@@ -446,7 +446,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireBox(const OrientedBoundingBox& box, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe sphere.
@@ -455,7 +455,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireSphere(const BoundingSphere& sphere, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the sphere.
@@ -464,7 +464,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawSphere(const BoundingSphere& sphere, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the tube.
@@ -476,7 +476,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawTube(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the wireframe tube.
@@ -488,7 +488,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
/// 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, Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
+ API_FUNCTION() static void DrawWireTube(const Vector3& position, const Quaternion& orientation, float radius, float length, const Color& color = Color::White, float duration = 0.0f, bool depthTest = true);
///
/// Draws the cylinder.
@@ -500,7 +500,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
///