Free flying Quaternion camera questions [Kind of working, but in a bad way]

Ello! As the title indicates, I’m making a free flying camera in which the rotation component is defined by a quaternion. I’ve been wrestling with it for quite a while, making my own quaternion class and incorporating it into my camera class. I’ve run into some problems with trying to decipher C++ example code into Java code and understanding quaternions in general. Ergo, I have some questions before I dive into this never ending wrestling match with camera controls. - I’ve mostly based my Quaternion code on this guy’s http://www.youtube.com/user/BSVino?feature=watch tuts and the “3D math primer for graphics and game development” book.

Q: Using mouse deltaX and deltaY to rotate the camera, do I multiply or SLERP?

  • Q: If SLERP is the way to go, what’s the best way to do rotation, for example, about the y+ (or up relative to worldspace) axis? After a 180 deg rotation there isn’t much to rotate to.

Q: If multiplication is the way to go, how exacly? Dividing x, y and z up into different Quaternions and then multiplying?

Q: I want to rotate my camera’s pitch and yaw with mouse movement in the x and y direction. Yet I get some roll, which is quite annoying. How can I negate all roll? Or is there some way to convert my x&y movement into a quaternion with which I can multiply my camera rotation quaternion?

Q: LWJGL’s Quaternion class seems to be missing SLERP and multiplyVector methods, should I just extend it and use my own? Or use a quaternion class entirely of my own?

Q: When is normalising your quaternion appropriate?

Questions may seem obvious, but my head is quite the cluster-f**k after contemplating quaternions a lot. Yet, I’m not asking for anyone to provide ready-made code/pseudocode (unless you feel it’s the easiest way to explain), telling me to multiply a with b for example helps me enough.

[Edit:] Edited some questions to be shorter and more to the point