FACT++  1.0
void Q3DCameraWidget::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from BasicGlCamera.

Definition at line 50 of file Q3DCameraWidget.cc.

References height, rotation, rotationy, and transZ.

Referenced by mouseMoveEvent().

51  {
52 
53  if (cEvent->buttons() & Qt::LeftButton)
54  {
55  rotationy = -60 + (cEvent->pos().y()/(float)height())*120.f;
56  rotation = 130 + (cEvent->pos().x()/(float)width())*180.f;
57  }
58  else if (cEvent->buttons() & Qt::RightButton)
59  {
60  if (cEvent->pos().y() > height()/2)
61  transZ -= 0.5;
62  else
63  transZ += 0.5;
64  }
65  updateGL();
66  }
int rotation
int rotationy
float transZ
float height
Definition: HeadersGPS.h:26

+ Here is the caller graph for this function: