12 #ifndef SLDEVICEROTATION_H
13 #define SLDEVICEROTATION_H
SLRotOffsetMode
Device rotation offset mode.
Encapsulation of a mobile device rotation set by the device's IMU sensor.
SLMat3f _rotation
Mobile device rotation as matrix.
SLfloat _rollRAD
Device roll angle in radians.
SLbool _isFirstSensorValue
Flag for the first sensor values.
void hasStarted(SLbool started)
SLQuat4f quaternion() const
SLbool zeroYawAtStart() const
SLfloat _startYawRAD
Initial yaw angle after _zeroYawAfterSec in radians.
void offsetMode(SLRotOffsetMode rom)
SLfloat _yawRAD
Device yaw angle in radians.
SLMat3f rotationAveraged()
SLbool _updateRPY
Calculate roll pitch yaw in onRotationQUAT.
SLbool _zeroYawAtStart
Quaternion rotation that is set by IMU.
void zeroYawAtStart(SLbool zeroYaw)
SLfloat _pitchRAD
Device pitch angle in radians.
SLRotOffsetMode _offsetMode
Rotation offset mode.
Averaged< SLMat3f > _rotationAvg
Component wise averaged rotation matrix.
SLbool _isUsed
Flag if device rotation is used.
void updateRPY(SLbool doUpdate)
void onRotationQUAT(SLfloat quatX, SLfloat quatY, SLfloat quatZ, SLfloat quatW)
SLfloat startYawRAD() const
SLRotOffsetMode offsetMode()
SLstring offsetModeStr() const
Returns the rotation offset mode as string.
Averaged template class provides an average value from a fixed size array.
static const float RAD2DEG