adjust light functionality,
bugs: - background cannot be changed during runtime
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user