|
@@ -376,7 +376,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 xref:ROOT:jme3/matrix.adoc[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 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 xref:core:math/matrix.adoc[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 Vector3f array.
|
|
|
|
|
|
|
|
|
==== Example - Rotate a Spatial Using fromAxes
|
|
@@ -397,7 +397,7 @@ s.getLocalRotation().fromAxes(axes);
|
|
|
|
|
|
=== Rotation Matrix
|
|
|
|
|
|
-Commonly you might find yourself with a xref:ROOT:jme3/matrix.adoc[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 give Matrix. The `toRotationMatrix` will populate a given Matrix.
|
|
|
+Commonly you might find yourself with a xref:core:math/matrix.adoc[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 give Matrix. The `toRotationMatrix` will populate a given Matrix.
|
|
|
|
|
|
|
|
|
==== Example - Rotate a Spatial Using a Rotation Matrix
|