How to convet 3D data from right-hand rule to left-hand rule ?

Roald Baudoux's icon

Hello,

I have a 3D vector with a free end. I need to rotate it around the fixed end and calculate the rotated position of the free end.

The rotation is provided by a sensor as a quaternion.

However the sensor's axes are organized following the right-hand rule (the z axis points towards the viewer when the x axis points rightwards and the y axis points upwards) while Jitter seem to follow the left-hand rule (the z axis points in the direction opposite to the viewer when the x axis points rightwards and the y axis points upwards) - by the way if there's a text about axes orientation and colors of the 3D reference axes in the doc, I couldn't find it.

So how do I convert coordinates following the right-hand system into coordinates following the left-hand rule?

Thank you in advance.

Rob Ramirez's icon

according to this, one way is by swapping some rows and columns of the transform matrix:
http://stackoverflow.com/questions/1263072/changing-a-matrix-from-right-handed-to-left-handed-coordinate-system

to operate on transform matrices, you can use jit.anim.node and query and set it's transform attribute. the patch below is a start. i would probably use javascript for something like this:

Max Patch
Copy patch and select New From Clipboard in Max.

Roald Baudoux's icon

I have found that page in between too, however I didn't know about the jit.anim.node.

Thanks Rob!