Trackball rotations

Does anyone have code implementing a trackball? I am creating a viewer and I want to be able to use the mouse to move the object around in a trackball style. My brain is too feeble from working all day to bother trying to figure this out. Maybe someone already has it done?

Originally posted by nickels:
Does anyone have code implementing a trackball? … Maybe someone already has it done?

Yes. look at my article in the OpenGl section of http://www.codeproject.com

Alex “Flappy” Falappa

I got the trackball working. It does exactly what I was expecting, thanks. I wrote an “openflight - like” graphics file format and API and I am working on a viewer for the format that works like a poor man’s MultiGen.

Thanks again.