applyQuaternion method
void
applyQuaternion(
- Quaternion arg
inherited
Applies a quaternion transform.
Implementation
void applyQuaternion(Quaternion arg) {
final argStorage = arg._qStorage;
final v0 = _v3storage[0];
final v1 = _v3storage[1];
final v2 = _v3storage[2];
final qx = argStorage[0];
final qy = argStorage[1];
final qz = argStorage[2];
final qw = argStorage[3];
final ix = qw * v0 + qy * v2 - qz * v1;
final iy = qw * v1 + qz * v0 - qx * v2;
final iz = qw * v2 + qx * v1 - qy * v0;
final iw = -qx * v0 - qy * v1 - qz * v2;
_v3storage[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
_v3storage[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
_v3storage[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
}