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


Handedness matrix test

Recommended Posts

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