PageRenderTime 41ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/InputSystem/Windows/WindowsAccelerometer.cs

#
C# | 68 lines | 42 code | 6 blank | 20 comment | 0 complexity | a26a7dae5d9e387d028181e7b55f2766 MD5 | raw file
Possible License(s): Apache-2.0
  1. using Delta.InputSystem.Devices;
  2. using Delta.Utilities.Datatypes;
  3. namespace Delta.InputSystem.Windows
  4. {
  5. /// <summary>
  6. /// Windows does not have any accelerometer support, if you want to emulate
  7. /// or test it in windows use the WiimoteAccelerometer class instead (just
  8. /// add that name to the beginning of your InputModule in Settings.xml).
  9. /// </summary>
  10. public class WindowsAccelerometer : BaseAccelerometer
  11. {
  12. #region IsConnected (Public)
  13. /// <summary>
  14. /// Is connected, will always return false.
  15. /// </summary>
  16. public override bool IsConnected
  17. {
  18. get
  19. {
  20. return false;
  21. }
  22. }
  23. #endregion
  24. #region Acceleration (Public)
  25. /// <summary>
  26. /// Acceleration, not used, always Zero.
  27. /// </summary>
  28. public override Vector Acceleration
  29. {
  30. get
  31. {
  32. return Vector.Zero;
  33. }
  34. }
  35. #endregion
  36. #region Rotation (Public)
  37. /// <summary>
  38. /// Rotation, not used, always 0.
  39. /// </summary>
  40. public override float Rotation
  41. {
  42. get
  43. {
  44. //Note: See WindowsAccelerometer for the Wiimote rotation calculation
  45. return 0;
  46. }
  47. }
  48. #endregion
  49. #region Methods (Private)
  50. #region Update
  51. /// <summary>
  52. /// Update, does nothing.
  53. /// </summary>
  54. protected override void Update()
  55. {
  56. // Empty method, nothing is supported here (quicker than executing the
  57. // BaseGamePad.Update method).
  58. }
  59. #endregion
  60. #endregion
  61. }
  62. }