1

So I am pretty new with Processing and I am trying to integrate the Oculus Rift in my current project.

Since I am reading the Oculus sensor data with an application found on internet, I am only able to get the transformation matrix instead of the Euler angles.

Now I need to extract the Yaw Pitch and Roll angles from the Matrix4x4.

Does anyone know how would I do that using processing?

Thank you.

  • This is rather a general, mathematical problem, and you find some results with the appropriate websearches (e.g. http://gamedev.stackexchange.com/questions/50963/how-to-extract-euler-angles-from-transformation-matrix , but many more). It seems that Processing has no dedicated data structure for 4x4 matrices, so is the Matrix given as a float[16]? If the question is not really specific for processing, you could consider removing the tag, because it might scare away people who may know the answer, but are not familiar with Processing. – Marco13 May 01 '14 at 11:22

1 Answers1

0

If you're working with the Oculus SDK Matrix4 class, you can easily use the Matrix4::ToEulerAngles() method. If you're working with another class then you should look for a method in that class that does something similar.

Jherico
  • 28,584
  • 8
  • 61
  • 87