回転メソッドを使用して JMonkeyEngine でジオメトリを回転することの違いは何ですか:
float r = FastMath.DEG_TO_RAD * 45f; // convert degrees to radians
geom.rotate(r, 0.0f, 0.0f); // rotate the geometry around the x-axis by 45 degrees
クォータニオンを使用してジオメトリを回転させる:
Quaternion roll045 = new Quaternion(); // create the quaternion
roll045.fromAngleAxis(45*FastMath.DEG_TO_RAD, Vector3f.UNIT_X); // supply angle and axis as arguments)
geom.setLocalRotation(roll045); // rotate the geometry around the x-axis by 45 degrees
結果は両方で同じであるため、これは私にとって混乱を招きます。そのため、違いと、どちらをいつ使用するかを調べたいと思います。
私が読んでいる本では、最初の方法は相対的であり、クォータニオンを使用する 2 番目の方法は絶対的であると書かれていますが、それが何を意味するのかはまだわかりません。