added MoveCamera but isn't working well

updated about text,
This commit is contained in:
Anakin
2017-02-04 15:48:10 +01:00
parent 648b805daf
commit 94a2fa59ec
6 changed files with 79 additions and 8 deletions

View File

@@ -27,7 +27,6 @@ void OrbitCamera::rotateAction(QVector2D diff)
m_theta -= diff.y() * 0.01;
m_theta = qMax(qMin(M_PI - 0.0001, m_theta), 0.0001);
}
void OrbitCamera::moveAction(QVector2D diff)
@@ -51,14 +50,14 @@ void OrbitCamera::recalculateMatrix()
tmpPosition.setZ(qCos(m_theta));
m_matrix.lookAt(m_roh * tmpPosition, QVector3D(0,0,0), QVector3D(0, 0, 1));
m_matrix.rotate(90, 90, 0);
m_matrix.rotate(90, 1, 0, 0);
m_matrix.rotate(90, 0, 1, 0);
}
void OrbitCamera::resetView()
{
m_roh = 4;
m_phi = -M_PI_2;
m_phi = 0; //-M_PI_2;
m_theta = M_PI_2;
CameraInterface::resetView();
}