Also I don't understand why use quaternion for rotation instead of Ang3 (yaw, pitch, roll)? I think that quaternion is too complicated. (it's not a complaint, it's a question) Please show me the power of quaternion that Ang3 can't archive, if any.
I haven't seen the advantage of quaternion, but I've already seen the bullshit it throw into my face.
For example, this code (source here
) (without this source, I can't figure out how to do simple thing like rotate a camera, so thanks, I guess)
As you see in the code
First, it converts from quaternion
to yaw-pitch-roll (Ang3)
: quaternion --> Matrix33 --> Ang3
Then it applies the input (if any) into the yaw-pitch-roll
Then it converts from yaw-pitch-roll
: Ang3 --> Matrix33 --> quaternion
Then to apply the yaw-pitch-roll
into the camera, it does it through Matrix34
. See, it doesn't even use quaternion
to apply rotation into the camera, but uses yaw-pitch-roll
to do that. quaternion
is just like something to show off and scare people off.
Maybe I'm wrong, but I think it's ridiculously complicated.