Trackball and panning

Hi !

Is anybody has an example of mixing trackball (rotation with mouse on virtual sphere and quaternions) and simple pan (translate scene with the mouse) ?
I get ugly results with rotating around wrong axe when I translate my model.
The rotation is around old center and not around new center.
I tried all orders for the matrix (rotate/translate and translate/rotate).

Thanks !

Try this (matrices are left multiplied in OpenGL, read from bottom to top.)

+translate (to object location)
rotate (in origin)
-translate (moves center of rotation to origin)
draw object

I found it !
My camera works properly now !
It was a mistake for evaluate the “world” vector during panning.
Thank you !