instantreality forum
news: Welcome to the instantreality forums!
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2018, 03:45:08 am

Login with username, password and session length

Pages: [1]
Author Topic: Rotation and normalized vectors  (Read 886 times)
Posts: 1

View Profile
« on: April 30, 2016, 04:15:16 pm »

Hey, folks!

I have a question about transformation in x3d. More specifically - rotation.
I want to figure out how to do rotation in 2 axis at the same time.
For e.g.: I have a standard plane and I'm rotating it by -10deg on 'X' axis and 10deg on 'Y' axis. So I have the following code:
<transform rotation='1 0 0 -.34'>
   <transform rotation='0 1 0 .34'>
         <plane size='5 5'></plane>

But how am I supposed to do so in just one transform?
I found this description on, but I still can't quite understand how to do it.
It says:
SFRotation is an axis-angle 4-tuple, indicating X-Y-Z direction plus angle orientation about that axis.  The first three values specify a normalized rotation axis vector about which the rotation takes place. (Thus the first three values shall be within the range [-1..+1] in order to represent a normalized unit vector.  Problem:  scientific notation allows leading digit.)  The fourth value specifies the amount of right-handed rotation about that axis in radians.

Thanks for your help!
Pages: [1]
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines