calculate normal matrix once in cpp (performance),

added bool variable to turn light on/off (still needs button),
This commit is contained in:
Anakin
2017-01-17 20:18:04 +01:00
parent f5863752e2
commit a521dfc292
4 changed files with 34 additions and 17 deletions

View File

@@ -38,7 +38,7 @@ private:
} m_rotDirections;
struct {
QVector3D position = { 1,1,1 };
QVector3D position = { 10,10,10 };
QVector3D intensities = { 1,0.25,0.25 };
} m_light;
@@ -50,6 +50,7 @@ private:
QQuaternion m_rotation;
bool m_wireframe = false;
bool m_lightOn = true;
protected:
void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;