|
@@ -1,18 +1,12 @@
|
|
|
= 3-D Rotation
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
-:revdate: 2016/03/17 20:48
|
|
|
-:relfileprefix: ../
|
|
|
-:imagesdir: ..
|
|
|
-:stylesheet: twemoji-awesome.css
|
|
|
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
-
|
|
|
+:revnumber: 2.0
|
|
|
+:revdate: 2020/07/13
|
|
|
|
|
|
_Bad news: 3D rotation is done using matrix calculus. +
|
|
|
Good news: If you do not understand calculus, there are two simple rules how you get it right._
|
|
|
|
|
|
|
|
|
-*3D rotation* is a crazy mathematical operation where you need to multiply all vertices in your object by four floating point numbers; the multiplication is referred to as concatenation, the array of four numbers {x,y,z,w} is referred to as <<jme3/quaternion#,quaternion>>. Don't worry, the 3D engine does the tough work for you. All you need to know is:
|
|
|
+*3D rotation* is a crazy mathematical operation where you need to multiply all vertices in your object by four floating point numbers; the multiplication is referred to as concatenation, the array of four numbers {x,y,z,w} is referred to as xref:ROOT:jme3/quaternion.adoc[quaternion]. Don't worry, the 3D engine does the tough work for you. All you need to know is:
|
|
|
|
|
|
*The Quaternion* is an object capable of deep-freezing and storing a rotation that you can apply to a 3D object.
|
|
|
|
|
@@ -186,8 +180,8 @@ For a deeper explaination, see this forum thread: link:https://hub.jmonkeyengine
|
|
|
|
|
|
This here is just about rotation, but there are three types of 3-D transformation: rotate, scale, and translate.
|
|
|
|
|
|
-You can do all transformations in individual steps (and then update the objects geometry and bounds), or you can combine them and transform the object in one step. If you have a lot of repetitive movement going on in your game it's worth learning more about <<jme3/matrix#,Matrix4f>> for optimization. JME can also help you interpolate the steps between two fixed transformations.
|
|
|
+You can do all transformations in individual steps (and then update the objects geometry and bounds), or you can combine them and transform the object in one step. If you have a lot of repetitive movement going on in your game it's worth learning more about xref:ROOT:jme3/matrix.adoc[Matrix4f] for optimization. JME can also help you interpolate the steps between two fixed transformations.
|
|
|
|
|
|
* com.jme3.math.Transform, interpolateTransforms() – interpolate a step between two transformations
|
|
|
** link:{link-javadoc}/com/jme3/math/Transform.html[com.jme.math.Transform]
|
|
|
-* In case you missed it, see also <<jme3/quaternion#,Quaternion>>.
|
|
|
+* In case you missed it, see also xref:ROOT:jme3/quaternion.adoc[quaternion].
|