|
@@ -82,7 +82,7 @@ s.getLocalRotation().fromAngles(angles);
|
|
|
|
|
|
=== Three Axes
|
|
|
|
|
|
-If you have three axes that define your rotation, where the axes define the left axis, up axis and directional axis respectively) you can make use of `fromAxes` to generate the Quaternion. It should be noted that this will generate a new <<jme3/matrix#,Matrix>> object that is then garbage collected, thus, this method should not be used if it will be called many times. Again, `toAxes` will populate a <<jme3/vector#,Vector3f>> array.
|
|
|
+If you have three axes that define your rotation, where the axes define the left axis, up axis and directional axis respectively) you can make use of `fromAxes` to generate the Quaternion. It should be noted that this will generate a new <<jme3/matrix#,Matrix>> object that is then garbage collected, thus, this method should not be used if it will be called many times. Again, `toAxes` will populate a <<jme3/terminology#vectors,Vector3f>> array.
|
|
|
|
|
|
|
|
|
==== Example - Rotate a Spatial Using fromAxes
|
|
@@ -103,7 +103,7 @@ s.getLocalRotation().fromAxes(axes);
|
|
|
|
|
|
=== Rotation Matrix
|
|
|
|
|
|
-Commonly you might find yourself with a <<jme3/matrix#,Matrix>> defining a rotation. In fact, it's very common to contain a rotation in a Matrix, create a Quaternion, rotate the Quaternion, and then get the Matrix back. Quaternion contains a `fromRotationMatrix` method that will create the appropriate Quaternion based on the given Matrix. The `toRotationMatrix` will populate a given Matrix.
|
|
|
+Commonly you might find yourself with a Matrix defining a rotation. In fact, it's very common to contain a rotation in a Matrix, create a Quaternion, rotate the Quaternion, and then get the Matrix back. Quaternion contains a `fromRotationMatrix` method that will create the appropriate Quaternion based on the given Matrix. The `toRotationMatrix` will populate a given Matrix.
|
|
|
|
|
|
|
|
|
==== Example - Rotate a Spatial Using a Rotation Matrix
|