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
- @param {Vector3} vec1 The first vector
Implementation
calculateRotationAxis(vec1, vec2) {
this._rotationMatrix.extractRotation(this._cameraMatrixState);
this._quat.setFromRotationMatrix(this._rotationMatrix);
this._rotationAxis.crossVectors(vec1, vec2).applyQuaternion(this._quat);
return this._rotationAxis.normalize().clone();
}