// Pan left/right/up/down without rotating about the object.
void QGLGraphicsNavigationItemPrivate::pan(qreal deltax, qreal deltay)
{
    QGLCamera *camera = viewportItem->camera();
    QPointF delta = viewDelta(deltax, deltay);
    QVector3D t = camera->translation(delta.x(), -delta.y(), 0.0f);

    // Technically panning the eye left should make the object appear to
    // move off to the right, but this looks weird on-screen where the user
    // actually thinks they are picking up the object and dragging it rather
    // than moving the eye.  We therefore apply the inverse of the translation
    // to make it "look right".
    camera->setEye(camera->eye() - t);
    camera->setCenter(camera->center() - t);
}