00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00035 #ifndef CRENDERER__H
00036 #define CRENDERER__H
00037
00038
00039
00041
00042 #include "QCameraInterpolationTool.h"
00043
00044
00046
00047 #include <qslider.h>
00048 #include <qgl.h>
00049
00050
00051
00053
00054
00055
00056
00057
00058 class CInterpolationRenderer : public QObject {
00059 Q_OBJECT
00060
00061
00062
00063 public:
00064 CInterpolationRenderer(QGLViewer*);
00065
00066 ~CInterpolationRenderer();
00067
00068 QGLViewer* getViewer(void) { return m_pViewer; };
00069
00070 void MakeGlList();
00071
00072
00073
00074 private:
00076 GLuint processHits(GLint hits, GLuint buffer[]);
00077
00078
00079
00080 private slots:
00081
00083 void sltInitializeGL();
00084
00086 void sltResizeGL(int w, int h);
00087
00089 void sltPaintGL();
00090
00092 void sltManageSelection(QMouseEvent *pqEvent);
00093
00095 void sltManageRelease(QMouseEvent *pqEvent);
00096
00098 void sltManageMove(QMouseEvent *pqEvent);
00099
00102 void sltResetSelection();
00103
00104
00105 private:
00106
00108 void renderScene(void);
00109
00111 void renderSolidSphere(const CP3D &cCenter, float radius,
00112 int n1, int n2, float lw=2.5);
00113
00115 void renderWireSphere(const CP3D &cCenter, float radius,
00116 int n1, int n2, float lw=2.5);
00117
00118
00119
00120 QGLViewer *m_pViewer;
00121 QCameraInterpolationTool *m_pInterpolator;
00122
00123 GLuint m_glDispList;
00124
00125 bool m_afSelected[12];
00126
00127 bool m_fLeftButtonPressed;
00128 bool m_fMiddleButtonPressed;
00129 bool m_fRightButtonPressed;
00130
00131 CP3D m_cSphereCenter[12];
00132
00133 int m_nMousePosX, m_nMousePosY;
00134 };
00135
00136 #endif // CRENDERER__H