Question about rotation

I have a geometry and it’s localtranslation is (200, 0, 90), i want to rotate the geometry arount (200,0,90) axis and parallel to the YOZ

could someone help me。 like this :

http://i.imgur.com/P7pyF.png

geometry.rotate(rotateAmount, 0, 0); ?



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:math_for_dummies

wezrule said:
geometry.rotate(rotateAmount, 0, 0); ?

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:math_for_dummies

i have read this . but it only told me how to rotate around x,y,z axis. i want to rotate around other axis.

Could it be helpful for you?

http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsLinear.java

http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsNonLinear.java

http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsSmooth1.java

http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsSmooth2.java



Basicly, you car rotate your model around any vector.

or try:



newQuaternion.fromAngleAxis(angle, vectorRotate);



vectorRotate is a vector rotate around.

angle is angle to rotate.



Don’t forget to normalize vectors!

vectoR = normalize(vectoR);

mifth said:
Could it be helpful for you?
http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsLinear.java
http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsNonLinear.java
http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsSmooth1.java
http://code.google.com/p/jme-simple-examples/source/browse/JMESimpleExamples/src/MifthBasics/SpatialMotionsSmooth2.java

Basicly, you car rotate your model around any vector.

Thank you very much! I am going to try it.
siyupy said:
i have read this . but it only told me how to rotate around x,y,z axis. i want to rotate around other axis.

Lol, so you are from another dimension? There is only those three axes in our world I am afraid. Do read the math for dummies again and try to understand.

Yeah, very useful!!!



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:math_for_dummies