Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit 92021a8

Browse files
committed
Added DebugDraw.DrawArrow
1 parent 386fe3b commit 92021a8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

FlaxEngine/API/Static/DebugDraw.Gen.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,28 @@ public static void DrawTube(Vector3 position, Quaternion orientation, float radi
159159
#endif
160160
}
161161

162+
/// <summary>
163+
/// Draws the arrow.
164+
/// </summary>
165+
/// <param name="position">The arrow origin position.</param>
166+
/// <param name="orientation">The orientation (defines the arrow direction).</param>
167+
/// <param name="color">The color.</param>
168+
/// <param name="scale">The arrow scale (used to adjust the arrow size).</param>
169+
/// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
170+
/// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
171+
#if UNIT_TEST_COMPILANT
172+
[Obsolete("Unit tests, don't support methods calls.")]
173+
#endif
174+
[UnmanagedCall]
175+
public static void DrawArrow(Vector3 position, Quaternion orientation, Color color, float scale = 1.0f, float duration = 0.0f, bool depthTest = true)
176+
{
177+
#if UNIT_TEST_COMPILANT
178+
throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
179+
#else
180+
Internal_DrawArrow(ref position, ref orientation, ref color, scale, duration, depthTest);
181+
#endif
182+
}
183+
162184
/// <summary>
163185
/// Draws the debug shapes to the custom texture using given GPU command context.
164186
/// </summary>
@@ -205,6 +227,9 @@ public static void Draw(FlaxEngine.Rendering.RenderTask task, IntPtr[] selectedA
205227
[MethodImpl(MethodImplOptions.InternalCall)]
206228
internal static extern void Internal_DrawTube(ref Vector3 position, ref Quaternion orientation, float radius, float length, ref Color color, float duration, bool depthTest);
207229

230+
[MethodImpl(MethodImplOptions.InternalCall)]
231+
internal static extern void Internal_DrawArrow(ref Vector3 position, ref Quaternion orientation, ref Color color, float scale, float duration, bool depthTest);
232+
208233
[MethodImpl(MethodImplOptions.InternalCall)]
209234
internal static extern void Internal_Draw(IntPtr task, IntPtr[] selectedActors, IntPtr target, IntPtr context, IntPtr depthBuffer, bool enableDepthTest);
210235
#endif

0 commit comments

Comments
 (0)