Search Results for

    Show / Hide Table of Contents

    Class DebugDraw

    The debug shapes rendering service. Not available in final game. For use only in the editor.

    Inheritance
    System.Object
    DebugDraw
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public static class DebugDraw : Object

    Methods

    AllocateContext()

    Allocates the context for Debug Drawing. Can be used to redirect debug shapes collecting to a separate container (instead of global state).

    Declaration
    [Unmanaged]
    public static IntPtr AllocateContext()
    Returns
    System.IntPtr

    The context object. Release it wil FreeContext. Returns null if failed.

    CanClear(IntPtr)

    Checks if can clear all debug shapes displayed on screen. Can be used to disable this functionality when not needed for the user.

    Declaration
    [Unmanaged]
    public static bool CanClear(IntPtr context = default(IntPtr))
    Parameters
    System.IntPtr context

    The context.

    Returns
    System.Boolean

    True fi context can be cleared (has any shapes), otherwise false.

    Clear(IntPtr)

    Clears all debug shapes displayed on screen.

    Declaration
    [Unmanaged]
    public static void Clear(IntPtr context = default(IntPtr))
    Parameters
    System.IntPtr context

    The context.

    Draw(ref RenderContext, GPUTextureView, GPUTextureView, Boolean)

    Draws the collected debug shapes to the output.

    Declaration
    [Unmanaged]
    public static void Draw(ref RenderContext renderContext, GPUTextureView target = null, GPUTextureView depthBuffer = null, bool enableDepthTest = false)
    Parameters
    RenderContext renderContext

    The rendering context.

    GPUTextureView target

    The rendering output surface handle.

    GPUTextureView depthBuffer

    The custom depth texture used for depth test. Can be MSAA. Must match target surface size.

    System.Boolean enableDepthTest

    True if perform manual depth test with scene depth buffer when rendering the primitives. Uses custom shader and the scene depth buffer.

    DrawActors(IntPtr, Int32, Boolean)

    Draws the debug shapes for the given collection of selected actors and other scene actors debug shapes.

    Declaration
    [Unmanaged]
    public static void DrawActors(IntPtr selectedActors, int selectedActorsCount, bool drawScenes)
    Parameters
    System.IntPtr selectedActors

    The list of actors to draw.

    System.Int32 selectedActorsCount

    The size of the list of actors.

    System.Boolean drawScenes

    True if draw all debug shapes from scenes too or false if draw just from specified actor list.

    DrawActorsTree(Actor)

    Draws the debug shapes for the given actor and the actor's children

    Declaration
    [Unmanaged]
    public static void DrawActorsTree(Actor actor)
    Parameters
    Actor actor

    The actor to start drawing at.

    DrawArc(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the arc.

    Declaration
    [Unmanaged]
    public static void DrawArc(Vector3 position, Quaternion orientation, float radius, float angle, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single angle

    The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawAxisFromDirection(Vector3, Vector3, Single, Single, Boolean)

    Draws the lines axis from direction.

    Declaration
    [Unmanaged]
    public static void DrawAxisFromDirection(Vector3 origin, Vector3 direction, float size = 100F, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 origin

    The origin of the line.

    Vector3 direction

    The direction of the line.

    System.Single size

    The size of the axis.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawBezier(Vector3, Vector3, Vector3, Vector3, Color, Single, Boolean)

    Draws a Bezier curve.

    Declaration
    [Unmanaged]
    public static void DrawBezier(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 p1

    The start point.

    Vector3 p2

    The first control point.

    Vector3 p3

    The second control point.

    Vector3 p4

    The end point.

    Color color

    The line color

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawBox(BoundingBox, Color, Single, Boolean)

    Draws the box.

    Declaration
    [Unmanaged]
    public static void DrawBox(BoundingBox box, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    BoundingBox box

    The box.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawBox(OrientedBoundingBox, Color, Single, Boolean)

    Draws the box.

    Declaration
    [Unmanaged]
    public static void DrawBox(OrientedBoundingBox box, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    OrientedBoundingBox box

    The box.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawCapsule(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws a capsule.

    Declaration
    [Unmanaged]
    public static void DrawCapsule(Vector3 position, Quaternion orientation, float radius, float length, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single length

    The length.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawCircle(Vector3, Float3, Single, Color, Single, Boolean)

    Draws the circle.

    Declaration
    [Unmanaged]
    public static void DrawCircle(Vector3 position, Float3 normal, float radius, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Float3 normal

    The normal vector direction.

    System.Single radius

    The radius.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawColliderDebugPhysics(Collider, RenderView)

    Draws the physics debug shapes for the given collider. Editor Only

    Declaration
    [Unmanaged]
    public static void DrawColliderDebugPhysics(Collider collider, RenderView view)
    Parameters
    Collider collider

    The collider to draw.

    RenderView view

    The render view to draw in.

    DrawCone(Vector3, Quaternion, Single, Single, Single, Color, Single, Boolean)

    Draws the cone.

    Declaration
    [Unmanaged]
    public static void DrawCone(Vector3 position, Quaternion orientation, float radius, float angleXY, float angleXZ, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single angleXY

    The angle (in radians) of the cone over the XY axis (cone forward is over X).

    System.Single angleXZ

    The angle (in radians) of the cone over the XZ axis (cone forward is over X).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawCylinder(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the cylinder.

    Declaration
    [Unmanaged]
    public static void DrawCylinder(Vector3 position, Quaternion orientation, float radius, float height, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single height

    The height.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawDirection(Vector3, Vector3, Color, Single, Boolean)

    Draws the line in a direction.

    Declaration
    [Unmanaged]
    public static void DrawDirection(Vector3 origin, Vector3 direction, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 origin

    The origin of the line.

    Vector3 direction

    The direction of the line.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawLightDebug(Light, RenderView)

    Draws the light debug shapes for the given light. Editor Only

    Declaration
    [Unmanaged]
    public static void DrawLightDebug(Light light, RenderView view)
    Parameters
    Light light

    The light debug to draw.

    RenderView view

    The render view to draw in.

    DrawLine(Vector3, Vector3, Color, Color, Single, Boolean)

    Draws the line.

    Declaration
    [Unmanaged]
    public static void DrawLine(Vector3 start, Vector3 end, Color startColor, Color endColor, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 start

    The start point.

    Vector3 end

    The end point.

    Color startColor

    The color of the start point.

    Color endColor

    The color of the end point.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawLine(Vector3, Vector3, Color, Single, Boolean)

    Draws the line.

    Declaration
    [Unmanaged]
    public static void DrawLine(Vector3 start, Vector3 end, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 start

    The start point.

    Vector3 end

    The end point.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawLines(Double3[], Matrix, Color, Single, Boolean)

    Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...).

    Declaration
    [Unmanaged]
    public static void DrawLines(Double3[] lines, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] lines

    The list of vertices for lines (must have multiple of 2 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawLines(Float3[], Matrix, Color, Single, Boolean)

    Draws the lines. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...).

    Declaration
    [Unmanaged]
    public static void DrawLines(Float3[] lines, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] lines

    The list of vertices for lines (must have multiple of 2 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawLines(GPUBuffer, Matrix, Single, Boolean)

    Draws the lines using the provided vertex buffer that contains pairs of Vertex elements. Line positions are located one after another (e.g. l0.start, l0.end, l1.start, l1.end,...).

    Declaration
    [Unmanaged]
    public static void DrawLines(GPUBuffer lines, Matrix transform, float duration = 0F, bool depthTest = true)
    Parameters
    GPUBuffer lines

    The GPU buffer with vertices for lines (must have multiple of 2 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawRay(Ray, Color, Single, Single, Boolean)

    Draws the line in a direction.

    Declaration
    [Unmanaged]
    public static void DrawRay(Ray ray, Color color, float length = 3.40282347E+38F, float duration = 0F, bool depthTest = true)
    Parameters
    Ray ray

    The ray.

    Color color

    The color.

    System.Single length

    The length of the ray.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawRay(Vector3, Vector3, Color, Single, Boolean)

    Draws the line in a direction. [Deprecated in v1.8]

    Declaration
    [Unmanaged]
    public static void DrawRay(Vector3 origin, Vector3 direction, Color color, float duration, bool depthTest)
    Parameters
    Vector3 origin

    The origin of the line.

    Vector3 direction

    The direction of the line.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawRay(Vector3, Vector3, Color, Single, Single, Boolean)

    Draws the line in a direction.

    Declaration
    [Unmanaged]
    public static void DrawRay(Vector3 origin, Vector3 direction, Color color, float length = 3.40282347E+38F, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 origin

    The origin of the line.

    Vector3 direction

    The direction of the line.

    Color color

    The color.

    System.Single length

    The length of the ray.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawSphere(BoundingSphere, Color, Single, Boolean)

    Draws the sphere.

    Declaration
    [Unmanaged]
    public static void DrawSphere(BoundingSphere sphere, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    BoundingSphere sphere

    The sphere.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawText(String, Float2, Color, Int32, Single)

    Draws the text on a screen (2D).

    Declaration
    [Unmanaged]
    public static void DrawText(string text, Float2 position, Color color, int size = 20, float duration = 0F)
    Parameters
    System.String text

    The text.

    Float2 position

    The position of the text on the screen (in screen-space coordinates).

    Color color

    The color.

    System.Int32 size

    The font size.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    DrawText(String, Transform, Color, Int32, Single)

    Draws the text (3D).

    Declaration
    [Unmanaged]
    public static void DrawText(string text, Transform transform, Color color, int size = 32, float duration = 0F)
    Parameters
    System.String text

    The text.

    Transform transform

    The transformation of the text (world-space).

    Color color

    The color.

    System.Int32 size

    The font size.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    DrawText(String, Vector3, Color, Int32, Single, Single)

    Draws the text (3D) that automatically faces the camera.

    Declaration
    [Unmanaged]
    public static void DrawText(string text, Vector3 position, Color color, int size = 32, float duration = 0F, float scale = 1F)
    Parameters
    System.String text

    The text.

    Vector3 position

    The position of the text (world-space).

    Color color

    The color.

    System.Int32 size

    The font size.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Single scale

    The text scale.

    DrawTriangle(Vector3, Vector3, Vector3, Color, Single, Boolean)

    Draws the triangle.

    Declaration
    [Unmanaged]
    public static void DrawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 v0

    The first triangle vertex.

    Vector3 v1

    The second triangle vertex.

    Vector3 v2

    The third triangle vertex.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Double3[], Color, Single, Boolean)

    Draws the triangles.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Double3[] vertices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Double3[], Matrix, Color, Single, Boolean)

    Draws the triangles.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Double3[] vertices, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Double3[], Int32[], Color, Single, Boolean)

    Draws the triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Double3[] vertices, int[] indices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Double3[], Int32[], Matrix, Color, Single, Boolean)

    Draws the triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Double3[] vertices, int[] indices, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Float3[], Color, Single, Boolean)

    Draws the triangles.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Float3[] vertices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Float3[], Matrix, Color, Single, Boolean)

    Draws the triangles.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Float3[] vertices, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Float3[], Int32[], Color, Single, Boolean)

    Draws the triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Float3[] vertices, int[] indices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTriangles(Float3[], Int32[], Matrix, Color, Single, Boolean)

    Draws the triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawTriangles(Float3[] vertices, int[] indices, Matrix transform, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Matrix transform

    The custom matrix used to transform all line vertices.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawTube(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the tube. [Deprecated in v1.10]

    Declaration
    [Unmanaged]
    public static void DrawTube(Vector3 position, Quaternion orientation, float radius, float length, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single length

    The length.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireArc(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the wireframe arc.

    Declaration
    [Unmanaged]
    public static void DrawWireArc(Vector3 position, Quaternion orientation, float radius, float angle, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single angle

    The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireArrow(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the wireframe arrow.

    Declaration
    [Unmanaged]
    public static void DrawWireArrow(Vector3 position, Quaternion orientation, float scale, float capScale, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The arrow origin position.

    Quaternion orientation

    The orientation (defines the arrow direction).

    System.Single scale

    The arrow scale (used to adjust the arrow size).

    System.Single capScale

    The arrow cap scale.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireBox(BoundingBox, Color, Single, Boolean)

    Draws the wireframe box.

    Declaration
    [Unmanaged]
    public static void DrawWireBox(BoundingBox box, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    BoundingBox box

    The box.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireBox(OrientedBoundingBox, Color, Single, Boolean)

    Draws the wireframe box.

    Declaration
    [Unmanaged]
    public static void DrawWireBox(OrientedBoundingBox box, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    OrientedBoundingBox box

    The box.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireCapsule(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the wireframe capsule.

    Declaration
    [Unmanaged]
    public static void DrawWireCapsule(Vector3 position, Quaternion orientation, float radius, float length, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single length

    The length.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireCone(Vector3, Quaternion, Single, Single, Single, Color, Single, Boolean)

    Draws the wireframe cone.

    Declaration
    [Unmanaged]
    public static void DrawWireCone(Vector3 position, Quaternion orientation, float radius, float angleXY, float angleXZ, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single angleXY

    The angle (in radians) of the cone over the XY axis (cone forward is over X).

    System.Single angleXZ

    The angle (in radians) of the cone over the XZ axis (cone forward is over X).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireCylinder(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the wireframe cylinder.

    Declaration
    [Unmanaged]
    public static void DrawWireCylinder(Vector3 position, Quaternion orientation, float radius, float height, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single height

    The height.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireFrustum(BoundingFrustum, Color, Single, Boolean)

    Draws the wireframe frustum.

    Declaration
    [Unmanaged]
    public static void DrawWireFrustum(BoundingFrustum frustum, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    BoundingFrustum frustum

    The frustum.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireSphere(BoundingSphere, Color, Single, Boolean)

    Draws the wireframe sphere.

    Declaration
    [Unmanaged]
    public static void DrawWireSphere(BoundingSphere sphere, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    BoundingSphere sphere

    The sphere.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTriangle(Vector3, Vector3, Vector3, Color, Single, Boolean)

    Draws the wireframe triangle.

    Declaration
    [Unmanaged]
    public static void DrawWireTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 v0

    The first triangle vertex.

    Vector3 v1

    The second triangle vertex.

    Vector3 v2

    The third triangle vertex.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTriangles(Double3[], Color, Single, Boolean)

    Draws the wireframe triangles.

    Declaration
    [Unmanaged]
    public static void DrawWireTriangles(Double3[] vertices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTriangles(Double3[], Int32[], Color, Single, Boolean)

    Draws the wireframe triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawWireTriangles(Double3[] vertices, int[] indices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Double3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTriangles(Float3[], Color, Single, Boolean)

    Draws the wireframe triangles.

    Declaration
    [Unmanaged]
    public static void DrawWireTriangles(Float3[] vertices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTriangles(Float3[], Int32[], Color, Single, Boolean)

    Draws the wireframe triangles using the given index buffer.

    Declaration
    [Unmanaged]
    public static void DrawWireTriangles(Float3[] vertices, int[] indices, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Float3[] vertices

    The triangle vertices list.

    System.Int32[] indices

    The triangle indices list (must have multiple of 3 elements).

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    DrawWireTube(Vector3, Quaternion, Single, Single, Color, Single, Boolean)

    Draws the wireframe tube. [Deprecated in v1.10]

    Declaration
    [Unmanaged]
    public static void DrawWireTube(Vector3 position, Quaternion orientation, float radius, float length, Color color, float duration = 0F, bool depthTest = true)
    Parameters
    Vector3 position

    The center position.

    Quaternion orientation

    The orientation.

    System.Single radius

    The radius.

    System.Single length

    The length.

    Color color

    The color.

    System.Single duration

    The duration (in seconds). Use 0 to draw it only once.

    System.Boolean depthTest

    If set to true depth test will be performed, otherwise depth will be ignored.

    FreeContext(IntPtr)

    Frees the context for Debug Drawing.

    Declaration
    [Unmanaged]
    public static void FreeContext(IntPtr context)
    Parameters
    System.IntPtr context

    The context.

    SetContext(IntPtr)

    Sets the context for Debug Drawing to a custom or null to use global default.

    Declaration
    [Unmanaged]
    public static void SetContext(IntPtr context)
    Parameters
    System.IntPtr context

    The context or null.

    UpdateContext(IntPtr, Single)

    Updates the context for Debug Drawing.

    Declaration
    [Unmanaged]
    public static void UpdateContext(IntPtr context, float deltaTime)
    Parameters
    System.IntPtr context

    The context.

    System.Single deltaTime

    The update delta time (in seconds).

    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat