ZXY to XYZ conversion
Does anyone know how to convert from a ZXY rotation system to an XYZ rotation system?
E:cb woof!
That''s what I was thinking, but maybe he was using matricies.
------------------------
Captured Reality.
------------------------
Captured Reality.
I am. I also need to know how to convert from ZXY TO YXZ. I use ZXY because you can propigate(sp) the angles down to the child objects (add parent''s angles to child''s) and YXZ because my engine needs a "tilt, rotation, spin" type of rendering. I''m using XYZ because it''s easier to use when moving objects in my object editor.
Could I just say "y=z;x=x;z=y;"? I havn''t actually tried that. I didn''t think it''d work.
Just so you know, the "XYZ" are the rotations in angles and the order they''re computed.
ie: YXZ first rotates on the y axis giving me the "rotation", then on the x axis giving me the "tilt", then on the z axis giving me the "spin"
E:cb woof!
Could I just say "y=z;x=x;z=y;"? I havn''t actually tried that. I didn''t think it''d work.
Just so you know, the "XYZ" are the rotations in angles and the order they''re computed.
ie: YXZ first rotates on the y axis giving me the "rotation", then on the x axis giving me the "tilt", then on the z axis giving me the "spin"
E:cb woof!
Try multiplying by this matrix...
0010
1000
0100
0001
That should switch 'em.
lntakitopi@aol.com / http://geocities.com/guanajam/
Edited by - SHilbert on June 4, 2000 8:55:41 AM
0010
1000
0100
0001
That should switch 'em.
lntakitopi@aol.com / http://geocities.com/guanajam/
Edited by - SHilbert on June 4, 2000 8:55:41 AM
that does the exact same thing as what i originally said.
x''=x*0+y*0+z*1
y''=x*1+y*0+z*0
z''=x*0+y*1+z*0
or..
x''=z
y''=x
z''=y
--
Float like a butterfly, bite like a crocodile.
x''=x*0+y*0+z*1
y''=x*1+y*0+z*0
z''=x*0+y*1+z*0
or..
x''=z
y''=x
z''=y
--
Float like a butterfly, bite like a crocodile.
This brings me to another question:
If you had an array of chars, let''s say charray[64]. And let''s say that it contained this phrase "Ten animals I slam in a net". How would we create a function that turns that into "ten a nimals I slamina net"? Maybe this question is a little basic, but I don''t know how to approach that.
"Remember, I'm the monkey, and you're the cheese grater. So no messing around."
-Grand Theft Auto, London
"It's not whether I win or lose, as long as I piss you off"
-Morrigan, Super Puzzle Fighter II Turbo
If you had an array of chars, let''s say charray[64]. And let''s say that it contained this phrase "Ten animals I slam in a net". How would we create a function that turns that into "ten a nimals I slamina net"? Maybe this question is a little basic, but I don''t know how to approach that.
"Remember, I'm the monkey, and you're the cheese grater. So no messing around."
-Grand Theft Auto, London
"It's not whether I win or lose, as long as I piss you off"
-Morrigan, Super Puzzle Fighter II Turbo
on behalf of all the good people on this forum that are just as confused as i am about what you just said, i have to say..
WHAT??
--
Float like a butterfly, bite like a crocodile.
WHAT??
--
Float like a butterfly, bite like a crocodile.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement