calculateRotationAxis method
dynamic
calculateRotationAxis(
- dynamic vec1,
- dynamic vec2
Calculate the rotation axis as the vector perpendicular between two vectors @param {Vector3} vec1 The first vector @param {Vector3} vec2 The second vector @returns {Vector3} The normalized rotation axis
Implementation
calculateRotationAxis(vec1, vec2) {
_rotationMatrix.extractRotation(_cameraMatrixState);
_quat.setFromRotationMatrix(_rotationMatrix);
_rotationAxis.crossVectors(vec1, vec2).applyQuaternion(_quat);
return _rotationAxis.normalize().clone();
}