fixed background bug,

support directional light,
zoom speed can be adjust via +/-
This commit is contained in:
Anakin
2017-01-21 15:22:43 +01:00
parent 5ea90723b4
commit c4444bcefd
5 changed files with 49 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ private:
} m_rotDirections;
struct {
QVector3D position = { 1,1,1 };
QVector4D position = { 1,1,1,0 };
QVector3D intensities = { 1.0,1.0,1.0 };
float attenuationFactor = 0.2f;
float ambientCoefficient = 0.005f;
@@ -56,6 +56,8 @@ private:
bool m_wireframe = false;
bool m_lightOn = false;
double m_zSpeed = 1.0;
protected:
void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
@@ -81,5 +83,8 @@ public slots:
void changeDirection(int direction);
void toggleWireframe();
void toggleLight();
signals:
void sendMessage(QString message, int severity);
};