Login  Register

Re: Rotation implementation in jogl's Quaternion class

Posted by trent on Jan 17, 2016; 6:37pm
URL: https://forum.jogamp.org/Rotation-implementation-in-jogl-s-Quaternion-class-tp4036043p4036044.html

I think I got it now: "rotate this quaternion" simply means multiplying this quaternion by a rotational quaternion q for a rotation around the y-axis. Hence,

rotateByAngleY(PI/2) means this * q, where q=(0, sin(PI/4),0,cos(PI/4)).

So this is useful for chaining rotations (if this is also a quaternion representing a rotation). For actually applying the rotation we use rotateVector(...).