reset view before loading a new file,
reset view when pressing space
This commit is contained in:
@@ -269,6 +269,16 @@ void OpenGLController::addTransZ(double value)
|
||||
dTranslationZ += value;
|
||||
}
|
||||
|
||||
void OpenGLController::resetView()
|
||||
{
|
||||
dTranslationX = 0;
|
||||
dTranslationY = 0;
|
||||
dTranslationZ = 5;
|
||||
fRotationX = 0;
|
||||
fRotationY = 0;
|
||||
fRotationZ = 0;
|
||||
}
|
||||
|
||||
void OpenGLController::updateScene()
|
||||
{
|
||||
// get new matrices
|
||||
@@ -327,7 +337,7 @@ void OpenGLController::loadMsh(const char * path)
|
||||
catch (std::invalid_argument e)
|
||||
{
|
||||
MessageBox(NULL, e.what(), "MeshViewer 2.0 Error", MB_OK | MB_ICONERROR);
|
||||
exit(1);
|
||||
return; exit(1);
|
||||
}
|
||||
|
||||
// collect vertex data of all models
|
||||
|
Reference in New Issue
Block a user