INuiSensor::NuiCameraElevationGetAngle Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Gets the elevation (tilt angle) whose range is [+/-27] degrees.

HRESULT NuiCameraElevationGetAngle(
         LONG *plAngleDegrees


Type: LONG
The pointer to the location that contains the elevation angle of the Kinect sensor in degrees. The pointer cannot be NULL when you call NuiCameraElevationGetAngle. Valid angles are in the range [NUI_CAMERA_ELEVATION_MINIMUM, NUI_CAMERA_ELEVATION_MAXIMUM].

Return Value

Returns S_OK if successful; otherwise, returns one of the following failure codes.
E_NUI_DEVICE_NOT_READYKinect has not been initialized.
E_POINTERThe plAngleDegrees parameter is an invalid handle.

You can tilt the field of view using the tilt motor in the sensor. The motor allows an additional [+/-27] degrees, which effectively doubles the volume that the field of view could surround.

The tilt is relative to gravity rather than relative to the sensor base. An elevation angle of zero indicates that the Kinect is pointing perpendicular to gravity.

The angle is subject to the physical limitations of the sensor. If the sensor base is resting on a tilted surface, the middle of the sensor's tilt range will not correspond to an elevation angle of zero, and the sensor may not be physically capable of reaching the outer limits of the range allowed by the API.

If the sensor is moved so that the base is at a different angle relative to gravity, or if the sensor is tilted manually, the angle reported by the API will change, even if the elevation angle has not been changed programmatically.

For more information, see Interaction Space.

Header: Declared in NuiSensor.h; however, include NuiApi.h in your project.