12 //#include "workerthread.h"
14 typedef enum axis_t
{ AXIS_X
, AXIS_Y
, AXIS_Z
};
18 class MyGLWidget
: public QGLWidget
23 // Non-default arguments must come first
24 MyGLWidget(Axis
*pAxisX
= 0, Axis
*pAxisY
= 0, Axis
*pAxisZ
= 0,
25 Camera
*pCamera
= 0, Sphere
*pSphere
= 0,
26 unsigned int timerInterval
= 100, WorkerThread
*pthread
= 0,
31 void setAxis(axis_t axis
, const Axis
*pAxis
);
32 void setCamera(const Camera
*pCamera
);
33 void setSphere(const Sphere
*pShere
);
34 void setThread(WorkerThread
*pthread
);
36 void startAnimation(void);
37 void stopAnimation(void);
45 void resizeGL(int width
, int height
);
50 WorkerThread
*m_pthread
;
54 void drawSphere(void);
56 // Sphere coordinations and orientation
65 unsigned int m_timerInterval
;
71 const Camera
*m_pCamera
;
72 const Sphere
*m_pSphere
;
75 #endif // MYGLWIDGET_H