[ODE] orientation in ODe
Jon Watte
hplus-ode at mindcontrol.org
Tue Mar 30 09:41:24 MST 2004
> What I DO convert is matrices (as written in
> http://q12.org/cgi-bin/wiki.pl?FrequentlyAskedQuestions) I get from
> geoms for rendering.
Why? You shouldn't convert any of that, either. If you put in data in a consistent coordinate system, you should take it out. The recommendation to transpose matrices is just wrong -- I've reported that before, on this forum, but nobody cared enough to say yea or nay to an edit. This time, I just made the edit in-place this time -- enjoy!
> Well, anyway, I mainly wanted to check if I collided with a face
> pointing up or down. Putting the collision-normals z-component in the
Note that triangle winding is not necessarily handedness independent. If a triangle is considered "up" using clockwise winding in a right-handed coordinate system, then the same triangle will be considered "up" using counterclockwise winding in a left-handed system. This is because "clockwise" is a physical, real-world phenomenon that doesn't change sign based on your coordinate system. Thus, if your normals come out upside down, or you fall through the floor, it's likely you need to invert the winding of your triangles.
Usually, this is not a problem, though, because GL is defined as right-handed with counter-clockwise winding, and DX is defined as left-handed with clockwise winding, so they do cancel out when converting. Only if you mix-and-match conventions will you need to worry about this.
Cheers,
/ h+
More information about the ODE
mailing list