Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Handedness matrix test

This topic is 5933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would you determine if a matrix is left-handed or right-handed, by performing some kind of test on it?

Share this post

Link to post
Share on other sites
Can a matrix be left or right handed? I think this is part of the semantics and thus cannot be tested.
Even though it might be possible that the engine you use uses matrices with positive determinant for left and negative determinant for right handed coordinate systems, or vice versa.
Or is my maths so far behind that this has nothing to do with determinants?
(btw. do not calculate the determinant of the 4x4 matrix, but only for the 3x3 part that is responsible for rotation/scaling/other linear transformations)

Share this post

Link to post
Share on other sites
take the x-, y-, and z-axis'' from the matrix:

x_axis = ( m[0][0], m[1][0], m[2][0] )
y_axis = ...
z_axis = ...

the have cross product:
z_axis2 = vec3_cross( x_axis,y_axis );

Then use dot product somehow to determine if z-axis and z_axis2 are same or opposite directions. If they are same direction then it''s right handed, othervise it''s left handed or something else

Assuming that the 3x3 (rptational) part is quite orthogonal.

Just thought that, but not quite sure if it works

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!