Handles.cs 997 B

123456789101112131415161718192021222324252627282930
  1. using BansheeEngine;
  2. namespace BansheeEditor
  3. {
  4. public sealed class Handles
  5. {
  6. // TODO - Implement these properly by retrieving them from some user-toggled properly
  7. public static bool MoveHandleSnapActive { get { return true; } }
  8. public static bool RotateHandleSnapActive { get { return true; } }
  9. public static bool ScaleHandleSnapActive { get { return true; } }
  10. public static float MoveSnapAmount { get { return 1.0f; /* TODO */ } }
  11. public static float RotateSnapAmount { get { return 1.0f; /* TODO */ } }
  12. public static float ScaleSnapAmount { get { return 1.0f; /* TODO */ } }
  13. public static float SnapValue(float value, float snapAmount)
  14. {
  15. int intValue = MathEx.FloorToInt(value/snapAmount);
  16. return value - intValue*snapAmount;
  17. }
  18. public static float GetHandleSize(Camera camera, Vector3 position)
  19. {
  20. // TODO
  21. return 1;
  22. }
  23. }
  24. }