// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. #if !FLAX_EDITOR using System; namespace FlaxEngine { /// /// The debug shapes rendering service. Not available in final game. For use only in the editor. /// [Unmanaged] [Tooltip("The debug shapes rendering service. Not available in final game. For use only in the editor.")] public static unsafe partial class DebugDraw { /// /// 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. public static void Draw(ref RenderContext renderContext, GPUTextureView target = null, GPUTextureView depthBuffer = null, 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. public static void DrawActors(IntPtr selectedActors, int selectedActorsCount) { } /// /// Draws the lines axis from direction. /// /// The origin of the line. /// The direction of the line. /// The color. /// The size of the axis. /// 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. public static void DrawAxisFromDirection(Vector3 origin, Vector3 direction, Color color ,float Size = 100.0f, float duration = 0.0f, bool depthTest = true){} /// /// 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. public static void DrawDirection(Vector3 origin, Vector3 direction, Color color, float duration = 0.0f, bool depthTest = true){} /// /// Draws the line in a direction. /// /// 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. public static void DrawRay(Vector3 origin, Vector3 direction, Color color, 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. public static void DrawRay(Ray ray,Color color, float length = 3.402823466e+38f, 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. public static void DrawLine(Vector3 start, Vector3 end, 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. public static void DrawLines(Vector3[] lines, Matrix transform, 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. public static void DrawCircle(Vector3 position, Vector3 normal, float radius, 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. public static void DrawWireTriangle(Vector3 v0, Vector3 v1, Vector3 v2, 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. public static void DrawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, 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. public static void DrawTriangles(Vector3[] vertices, 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. public static void DrawTriangles(Vector3[] vertices, int[] indices, 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. public static void DrawWireBox(BoundingBox box, 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. public static void DrawWireFrustum(BoundingFrustum frustum, 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. public static void DrawWireBox(OrientedBoundingBox box, 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. public static void DrawWireSphere(BoundingSphere sphere, 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. public static void DrawSphere(BoundingSphere sphere, 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. public static void DrawWireTube(Vector3 position, Quaternion orientation, float radius, float length, 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. public static void DrawWireCylinder(Vector3 position, Quaternion orientation, float radius, float height, 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 arrow cap scale. /// 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. public static void DrawWireArrow(Vector3 position, Quaternion orientation, float scale, float capScale, 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. public static void DrawBox(BoundingBox box, 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. public static void DrawBox(OrientedBoundingBox box, Color color, float duration = 0.0f, bool depthTest = true) { } } } #endif