【下载地址】:http://download.csdn.net/source/877241
【说明】:
GetGVector
Returns a vector that desribes the direction of gravity/acceleration in relation to the device screen.
- When the device is face up on a flat surface, this method would return 0, 0, -9.8. The Z value of -9.8 would mean that the acceleration in the opposite direction of the orientation of the screen.
- When the device is held standing up, this method would return 0, -9.8, 0. The Y value of -9.8 would mean that the device is accelerating in the direction of the bottom of the screen.
- Conversely, if the device is held upside down, this method would return 0, 9.8, 0.