update method

void update()

Implementation

void update(){
    if (enabled == false ) return;

    final device = _deviceOrientation;

    final double alpha = device.yaw + alphaOffset; // Z
    final double beta = device.pitch; // X'
    final double gamma = device.roll; // Y''
    final double orient = screenOrientation > 0? screenOrientation.toRad(): 0; // O

    setObjectQuaternion( object.quaternion, alpha, beta, gamma, orient );

    if ( 8 * ( 1 - _lastQuaternion.dot(object.quaternion)) > eps ) {
      _lastQuaternion.setFrom(object.quaternion);
    }
}