Silly Matrix question

Started by .jayderyu, January 15, 2010, 12:51:24 AM

Previous topic - Next topic

.jayderyu

It's a simple answer to those that know, but i'm a bit of a Matrix twit :\   

JPCT has a different Y Z axis on a rotation. In an Object3D.getDump().
How would I change it to mirror the YZ value.

My thought was some thing like this.

[0,    *-1, *-1,  0]
[*-1, *-1,    0,  0]
[*-1,    0, *-1,  1]
[   0,    0,    0,  0]

The idea was flipping the values for YZ rotation assuming row major. I think. I've been searching the web so I'm more guessing.

EgonOlsen

This should do it:


mat.rotateX((float) Math.PI);

.jayderyu

well, that's so simple no wonder I missed it. Of course. Rotate along the X by PI that flips both. sigh. No wonder it took a long time for an answer. It was just obvious. :P