PageRenderTime 122ms CodeModel.GetById 58ms app.highlight 7ms RepoModel.GetById 53ms app.codeStats 0ms

/InputSystem/Windows/WindowsAccelerometer.cs

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