calculate normal matrix once in cpp (performance),
added bool variable to turn light on/off (still needs button),
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user