SceneGizmos.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. using bs;
  6. namespace bs.Editor
  7. {
  8. /** @addtogroup Scene-Editor
  9. * @{
  10. */
  11. /// <summary>
  12. /// Handles rendering of the scene gizmos for the specified camera.
  13. /// </summary>
  14. internal sealed class SceneGizmos : ScriptObject
  15. {
  16. /// <summary>
  17. /// Creates a new scene gizmo renderer.
  18. /// </summary>
  19. /// <param name="sceneCamera">Camera into which the gizmos will be rendered.</param>
  20. internal SceneGizmos(Camera sceneCamera)
  21. {
  22. Internal_Create(this, sceneCamera.GetCachedPtr());
  23. }
  24. /// <summary>
  25. /// Queues gizmo drawing for this frame.
  26. /// </summary>
  27. internal void Draw()
  28. {
  29. Internal_Draw(mCachedPtr);
  30. }
  31. [MethodImpl(MethodImplOptions.InternalCall)]
  32. private static extern void Internal_Create(SceneGizmos managedInstance, IntPtr camera);
  33. [MethodImpl(MethodImplOptions.InternalCall)]
  34. private static extern void Internal_Draw(IntPtr thisPtr);
  35. }
  36. /** @} */
  37. }