Rotation by vectors

Started by
3 comments, last by SoaringTortoise 20 years, 10 months ago
Is it possible, and if so how, to create a world transform rotation matrix that is based on vectors? As in the view matrix where you specify a lookat, up and right vectors, I would like to do exactly the same thing with the world matrix. Possible, or not?
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
Advertisement
If you have the object''s:
lookAt, right and up vectors
position (of its origin)

then the world matrix is (expand the vectors):
right    0up       0lookAt   0position 1 

Sorry, I didn't understand that. Could you rephrase/ change the notation?

[edited by - Soaringtortoise on June 3, 2003 10:45:00 AM]
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
He means:

vector "right" -> Rx, Ry, Rz
vector "up" -> Ux, Uy, Uz
vector "lookAt" -> Lx, Ly, Lz
vector "position" -> Px, Py, Pz

then the matrix would be (in 4x4 matrix)

Rx Ry Rz 0Ux Uy Uz 0Lx Ly Lz 0Px Py Pz 1  


I don't know whether that works or not, that's just what he was saying.

[edited by - Nypyren on June 3, 2003 11:50:55 PM]
OK. Now that makes sense. Thanks, I''ll give it a go and see what happens.
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...

This topic is closed to new replies.

Advertisement