HandleSliderSphere.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 Handles
  9. * @{
  10. */
  11. /// <summary>
  12. /// Handle slider represented by a sphere collider. The slider doesn't allow dragging (it doesn't report a delta value
  13. /// like other sliders) but can be used for picking (selection) purposes.
  14. /// </summary>
  15. public sealed class HandleSliderSphere : HandleSlider
  16. {
  17. /// <summary>
  18. /// Creates a new sphere handle slider.
  19. /// </summary>
  20. /// <param name="parentHandle">Handle that the slider belongs to.</param>
  21. /// <param name="radius">Radius of the collider sphere.</param>
  22. /// <param name="fixedScale">If true the handle slider will always try to maintain the same visible area in the
  23. /// viewport regardless of distance from camera.</param>
  24. /// <param name="layer">Layer that allows filtering of which sliders are interacted with from a specific camera.</param>
  25. public HandleSliderSphere(Handle parentHandle, float radius, bool fixedScale = true, UInt64 layer = 1)
  26. :base(parentHandle)
  27. {
  28. Internal_CreateInstance(this, radius, fixedScale, layer);
  29. }
  30. [MethodImpl(MethodImplOptions.InternalCall)]
  31. private static extern void Internal_CreateInstance(HandleSliderSphere instance, float radius, bool fixedScale,
  32. UInt64 layer);
  33. }
  34. /** @} */
  35. }