INuiSensor::NuiAccelerometerGetCurrentReading Method
Kinect for Windows 1.5, 1.6, 1.7, 1.8
Gets the accelerometer reading.
Syntax
public:
HRESULT NuiAccelerometerGetCurrentReading(
Vector4 *pReading
)
Parameters
- pReading
Type: Vector4
A Vector4 pointing in the directon of gravity.
Return Value
Type: HRESULT
Returns S_OK if successful; otherwise, returns a failure code.
Remarks
The accelerometer reading is returned as a 3d vector pointing in the direction of gravity (the floor on a non-accelerating sensor). The vector is in gravity units (g), or 9.81m/s^2. The coordinate system is centered on the sensor, and is a right-handed coordinate system with positive z in the direction the sensor is pointing at. In the default sensor rotation (horizontal, level placement), this will return the vector (0, -1.0, 0, 0). The w value of the Vector4 is always set to 0.0.
Requirements
Header: Declared in nuisensor.h.