use class for camera handling,

orbit does not work. Need to figure out why
This commit is contained in:
Anakin
2017-02-02 18:01:08 +01:00
parent b17ab3f8e9
commit 333eca25eb
12 changed files with 329 additions and 185 deletions

View File

@@ -5,6 +5,7 @@
#include <QMatrix4x4>
#include "GeometryEngine.h"
#include "SettingsWindow.h"
#include "CameraInterface.h"
class GeometryEngine;
@@ -37,25 +38,16 @@ private:
bool headlight = false;
} m_light;
SettingsWindow* m_settings;
struct {
bool left = false;
bool right = false;
QVector2D position;
} m_mouse;
struct {
bool x = true;
bool y = true;
bool z = true;
} m_rotDirections;
QMatrix4x4 m_projection;
QVector3D m_translation;
QQuaternion m_rotation;
CameraInterface* m_camera;
double m_zSpeed = 1.0;
SettingsWindow* m_settings;
// functions
private:
@@ -81,10 +73,13 @@ protected:
// slots
public slots:
void loadFile(QString name);
void toggleAxis(int axis);
void useFreeCamera();
void useOrbitCamera();
void useMoveCamera();
void toggleWireframe();
void toggleLight();
void showSettings();
void setBGColorOff(QVector3D value);
void setBGColorOn(QVector3D value);
void setLightColor(QVector3D value);
@@ -92,7 +87,6 @@ public slots:
void setAmbCoef(double value);
void setHeadlight(bool value);
void setBackfaceCulling(bool value);
void setZoomSpeed(int percent);
};