PDA

View Full Version : Matrix Conversion



Joe_Collins
09-29-2002, 10:04 AM
Hi all.
I have a 3ds Max exporter that I wrote. The models in max use a different axis than I would normally want to use. The y axis points out of the screen and the z axis points up.

I wrote some code to convert the verts and normals -
myvert.x = maxvert.x
myvert.y = maxvert.z
myvert.z = -maxvert.y

This works fine. I am having trouble visualizing how to convert matrices and quats into this new axis.

I am at first tempted to rotate 90 around the x axis but don't think that will work.

If i set up an orthonormal matrix aligned to my axis will it do the right thing? ie...
[ 1 0 0 0 ]
[ 0 0 1 0 ]
[ 0 -1 0 0 ]
[ 0 0 0 1 ]

Any help is appreciated.

Thanks,

-Joe