some cleanup

This commit is contained in:
michal
2014-09-07 16:19:13 -04:00
parent 1ed86079e3
commit f0f3b08ab6
6 changed files with 33 additions and 29 deletions
+3 -3
View File
@@ -264,7 +264,7 @@ void InteractionHandler::trackballRotate(int x, int y) {
glm::vec2 mousePos = glm::vec2((float)x/width, (float)y/height);
mousePos = glm::clamp(mousePos, -0.5, 1.5); // Ugly fix #1: Camera position becomes NaN on mouse values outside [-0.5, 1.5]
mousePos[1] = 0.5; // Ugly fix #2: Tempoarily only allow rotation around y
//mousePos[1] = 0.5; // Ugly fix #2: Tempoarily only allow rotation around y
glm::vec3 curTrackballPos = mapToTrackball(mousePos);
// LDEBUG(mousePos.x << ", " << mousePos.y << " = " << curTrackballPos.x << ", " << curTrackballPos.y << ", " << curTrackballPos.z);
@@ -304,12 +304,12 @@ void InteractionHandler::keyboardCallback(int key, int action) {
const double speed = 2.75;
const double dt = getDt();
if (key == 'S') {
glm::vec3 euler(speed * dt, 0.0, 0.0);
glm::vec3 euler(speed * dt* pow(10, 17), 0.0, 0.0);
glm::quat rot = glm::quat(euler);
orbit(rot);
}
if (key == 'W') {
glm::vec3 euler(-speed * dt, 0.0, 0.0);
glm::vec3 euler(-speed * dt* pow(10, 17), 0.0, 0.0);
glm::quat rot = glm::quat(euler);
orbit(rot);
}
+1 -1
View File
@@ -57,7 +57,7 @@ int printOglError(char *file, int line){
#define GLSPRITES
//#define GLPOINTS
#define GLPOINTS
namespace {
const std::string _loggerCat = "RenderableStars";