#### Archived

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.

## Recommended Posts

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

##### 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 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 on other sites
Thanks, sorry for double-posting. Didn''t know where
to put this one.

1. 1
2. 2
3. 3
4. 4
Rutin
17
5. 5

• 13
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
632927
• Total Posts
3009242
• ### Who's Online (See full list)

There are no registered users currently online

×