git-svn-id: svn://db.shs.com.ru/libs@651 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -199,17 +199,17 @@ void MouseController::mouseMoveEvent(QMouseEvent * e) {
|
||||
float dy = e->y() - lastPos.y();
|
||||
if (e->buttons().testFlag(Qt::MidButton)) {
|
||||
if (cameraOrbit_) {
|
||||
view->camera()->orbitZ(dx / 4.f);
|
||||
view->camera()->orbitZ (dx / 4.f);
|
||||
view->camera()->orbitXY(dy / 4.f);
|
||||
} else {
|
||||
view->camera()->rotateZ(dx / 4.f);
|
||||
view->camera()->rotateXY(dy / 4.f);
|
||||
view->camera()->rotateX(dy / 4.f);
|
||||
}
|
||||
emit view->cameraPosChanged(view->camera()->pos());
|
||||
} else if (e->buttons().testFlag(Qt::RightButton)) {
|
||||
float ad = view->camera()->distance();
|
||||
view->camera()->moveLeft(dx / 1000.f * ad);
|
||||
view->camera()->moveUp(dy / 1000.f * ad);
|
||||
view->camera()->moveUp (dy / 1000.f * ad);
|
||||
emit view->cameraPosChanged(view->camera()->pos());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user