here is what i have so far http://snipt.org/vgBe9.

Originally the cube was just rotating along one of the 3 axis depending on what mousebutton i clicked. I have the functions for the trackball,...