View Full Version : Yet more view manipulation stuff...

07-01-2003, 11:41 AM
Hello All,

I'm new to the forum, so forgive me for rehashing something that keeps coming up time and time again. I am coding a technical model viewer at the minute, and the time has come to rehash my view manipulation routines, which I have necapsulated in a camera class. I use quaternion-based rotation functions (similar to the trackbal.c routine mentioned in another thread) cos it gives a 'nice' motion, and have previously zoomed and panned using glScale and glTranslate. However this creates problems when I want to change the centre of rotation of my trackball - I need to translate to the centre of the trackball, do a glMultMatrix for the rotation, translate back to the origin, translate to the reference point of the model yahdee yahdee yah - so I am thinking of changing my zoom routines to altering the left/right & top/bottom clipping planes (everything is done in glOrtho projection). However I have previously had problems with distortion (created by the fact that viewports are defined in integers) at high zoom levels. Has anyone else ever come across this, and if so how did you solve it? Or should I just stick to using glScale and get round the awkward series of translations?