private void rotateNone() { if(_localRot != null) { _orient.set(getRotation()); _orient.multiplyLocal(_localRot); _worldTransform.setRotation(_orient); } }
final double temp22 = _m00 * _m11 - _m01 * _m10; result.set(temp00, temp01, temp02, temp10, temp11, temp12, temp20, temp21, temp22); result.multiplyLocal(1.0 / det); return result;
final double temp22 = _m00 * _m11 - _m01 * _m10; result.set(temp00, temp01, temp02, temp10, temp11, temp12, temp20, temp21, temp22); result.multiplyLocal(1.0 / det); return result;
/** * Rotate the billboard so it points directly opposite the direction the camera's facing */ private void rotateScreenAligned() { final Camera camera = Camera.getCurrentCamera(); _look.set(camera.getDirection()).negateLocal(); _left.set(camera.getLeft()).negateLocal(); _orient.fromAxes(_left, camera.getUp(), _look); if(_localRot != null) _orient.multiplyLocal(_localRot); _worldTransform.setRotation(_orient); }
/** * Aligns this Billboard Node so that it points to the camera position. */ private void rotateCameraAligned() { final Camera camera = Camera.getCurrentCamera(); _look.set(camera.getLocation()).subtractLocal(_worldTransform.getTranslation()).normalizeLocal(); _left.set(camera.getUp()).crossLocal(_look); final Vector3 up = Vector3.fetchTempInstance(); up.set(_look).crossLocal(_left); _orient.fromAxes(_left, up, _look); if(_localRot != null) _orient.multiplyLocal(_localRot); _worldTransform.setRotation(_orient); Vector3.releaseTempInstance(up); }
newMatrix.transposeLocal(); if (sx != 1.0) { newMatrix.multiplyLocal(1.0 / sx);
newMatrix.transposeLocal(); if (sx != 1.0) { newMatrix.multiplyLocal(1.0 / sx);
result._rotationMatrix = true; final Matrix3 newRotation = result._matrix; newRotation.set(_matrix).multiplyLocal(transformBy.getMatrix()); newMatrix.set(matrixA).multiplyLocal(matrixB);
result._rotationMatrix = true; final Matrix3 newRotation = result._matrix; newRotation.set(_matrix).multiplyLocal(transformBy.getMatrix()); newMatrix.set(matrixA).multiplyLocal(matrixB);
final Matrix3 mat = Matrix3.fetchTempInstance().set(_worldTransform.getMatrix()).multiplyLocal(_orient); _worldTransform.setRotation(mat); Matrix3.releaseTempInstance(mat);
_orient.multiplyLocal(_localRot); worldMatrix.multiplyLocal(_orient); _worldTransform.setRotation(worldMatrix); Matrix3.releaseTempInstance(worldMatrix);
_rotateStore.multiplyLocal(new Quaternion().fromVectorToVector(_calcVec3A, _calcVec3B).toRotationMatrix( _calcMat3));
worldMatrix.multiplyLocal(_orient); _worldTransform.setRotation(worldMatrix); Matrix3.releaseTempInstance(worldMatrix);
1.0, 1.1, 1.2, // 2.0, 2.1, 2.2); mat3A.multiplyLocal(2); assertEquals(new Matrix3( // 0.02, 0.2, 0.4, // assertTrue(4.0 * 1 + 4.2 * 5 + 4.4 * 9 == result.getM21()); assertTrue(4.0 * 2 + 4.2 * 6 + 4.4 * 10 == result.getM22()); mat3A.multiplyLocal(mat3B); assertTrue(0.02 * 0.5 + 0.2 * 4 + 0.4 * 8 == mat3A.getM00()); assertTrue(0.02 * 1 + 0.2 * 5 + 0.4 * 9 == mat3A.getM01());