adjust light functionality,

bugs:
- background cannot be changed during runtime
This commit is contained in:
Anakin
2017-01-18 17:01:43 +01:00
parent a521dfc292
commit 4c177f2ddc
9 changed files with 75 additions and 35 deletions

View File

@@ -38,7 +38,7 @@ private:
} m_rotDirections;
struct {
QVector3D position = { 10,10,10 };
QVector3D position = { 1,1,1 };
QVector3D intensities = { 1,0.25,0.25 };
} m_light;
@@ -50,7 +50,7 @@ private:
QQuaternion m_rotation;
bool m_wireframe = false;
bool m_lightOn = true;
bool m_lightOn = false;
protected:
void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
@@ -68,6 +68,7 @@ protected:
private:
void initShaders();
void setConnections();
void updateLightPosition();
private slots:
void resetView();
@@ -75,5 +76,6 @@ private slots:
public slots:
void changeDirection(int direction);
void toggleWireframe();
void toggleLight();
};