setObjectQuaternion method

void setObjectQuaternion(
  1. Quaternion quaternion,
  2. double alpha,
  3. double beta,
  4. double gamma,
  5. double orient,
)

Implementation

void setObjectQuaternion(Quaternion quaternion, double alpha, double beta, double gamma, double orient ) {
    _euler.set( beta, alpha, - gamma, RotationOrders.xyz); // 'ZXY' for the device, but 'YXZ' for us
    quaternion.setFromEuler( _euler ); // orient the device
    quaternion.multiply( _q1 ); // camera looks out the back of the device, not the top
    quaternion.multiply( _q0.setFromAxisAngle( _zee, - orient ) ); // adjust for screen orientation
}