It's a bit ugly, but you can look at the boxes demo. If thats what you are looking for, the (spheric) trackball.h/cpp + scene.cpp might be worth a look.

HIH

Johannes