Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

INuiSensor::NuiAccelerometerGetCurrentReading Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Gets the accelerometer reading.

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.

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.

Header: Declared in nuisensor.h.

Community Additions

ADD
Show:
© 2015 Microsoft