btmatrix3x3: Difference between getEulerYPR and getEulerZYX

Post Reply
Zenja
Posts: 14
Joined: Fri Jul 10, 2009 4:48 am

btmatrix3x3: Difference between getEulerYPR and getEulerZYX

Post by Zenja »

Hello.
I'm relatively new to Bullet, and have found that these 2 methods (btMatrix3x3::getEulerYPR and btMatrix3x3::getEulerZYX) for my datasets produce the same results. I'm just curious as to why there are 2 methods which apparently do the same thing and end up with the exact same result.

Cheers.
shogun
Posts: 34
Joined: Tue Mar 04, 2008 3:16 pm

Post by shogun »

When you look into the code you will see that SetEulerYPR just calls setEulerZYX, with different order of the parameters. But I don't know why this function exists, either.
Zenja
Posts: 14
Joined: Fri Jul 10, 2009 4:48 am

Re: btmatrix3x3: Difference between getEulerYPR and getEulerZYX

Post by Zenja »

I'm using 2.75rc3, and they are different.

getEulerYPR has 3 calculations and sign adjustment.
getEulerZYX has additional code for singularity detection and gimbal locks.

Since I'm new to Bullet, I didn't know which one to select, and tested both, and was suprised to see that they both returned the same results for all of my test cases.

Edit spelling.
shogun
Posts: 34
Joined: Tue Mar 04, 2008 3:16 pm

Re: btmatrix3x3: Difference between getEulerYPR and getEulerZYX

Post by shogun »

I'm sorry, I mixed it up with setEuler... instead of getEuler...
Post Reply