Commit de4f6e6d by Philipp Adolf

Change formatting of mainwidget.h

parent ad28fd9c
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_4_3_Core class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_4_3_Core
{ {
Q_OBJECT Q_OBJECT
public: public:
MainWidget(Camera *cam); MainWidget(Camera *cam);
...@@ -35,41 +36,33 @@ public slots: ...@@ -35,41 +36,33 @@ public slots:
void subdivide(int level); void subdivide(int level);
void setdebugOutput(bool output); void setdebugOutput(bool output);
protected: protected:
void initializeGL(); void initializeGL();
void paintGL(); void paintGL();
void resizeGL(int width, int height); void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event ) ; void mousePressEvent(QMouseEvent *event ) ;
void mouseMoveEvent(QMouseEvent *event ) ; void mouseMoveEvent(QMouseEvent *event ) ;
void wheelEvent(QWheelEvent *event ) ; void wheelEvent(QWheelEvent *event ) ;
private: private:
QVector3D* trackballPoint(int x, int y); Camera *cam;
void rotate(QVector3D *newPos ); QOpenGLShaderProgram* subdivisionShader;
void move(QPointF *newPos ); QOpenGLShaderProgram* regularShader;
QMatrix4x4 m_projection;
Camera *cam; QTime startTime;
QTime rotTime;
QOpenGLShaderProgram* subdivisionShader; float camDistance;
QOpenGLShaderProgram* regularShader; QVector3D *lastSpeherePos;
QMatrix4x4 m_projection; QPointF * lastScreenPos;
QTime startTime; Subdivision *subdivision;
QTime rotTime; Mesh *mesh;
float camDistance; QOpenGLShaderProgram* initShaderProgram(QString vertSource, QString tesselationControlSource, QString tesselationEvaluationSource, QString geometrySource, QString fragSource );
QOpenGLShader* initGLShader(QString scource, QOpenGLShader::ShaderType type);
QVector3D *lastSpeherePos; QVector3D* trackballPoint(int x, int y);
QPointF * lastScreenPos; void rotate(QVector3D *newPos );
void move(QPointF *newPos );
Subdivision *subdivision;
Mesh *mesh;
QOpenGLShaderProgram* initShaderProgram(QString vertSource, QString tesselationControlSource, QString tesselationEvaluationSource, QString geometrySource, QString fragSource );
QOpenGLShader* initGLShader(QString scource, QOpenGLShader::ShaderType type);
}; };
#endif // MAINWIDGET_H #endif // MAINWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment