various stuff in opengl demos such as a better model, stable trackball for the fly navigation mode, and started to put some GUI elements...
diff --git a/demos/opengl/camera.cpp b/demos/opengl/camera.cpp index 26118e6..f704771 100644 --- a/demos/opengl/camera.cpp +++ b/demos/opengl/camera.cpp
@@ -42,8 +42,7 @@ mVpX = 0; mVpY = 0; - setPosition(Vector3f::Constant(50.)); - + setPosition(Vector3f::Constant(100.)); setTarget(Vector3f::Zero()); } @@ -179,6 +178,14 @@ mViewIsUptodate = true; } +void Camera::localRotate(const Quaternionf& q) +{ + float dist = (position() - mTarget).norm(); + setOrientation(orientation() * q); + mTarget = position() + dist * direction(); + mViewIsUptodate = false; +} + void Camera::zoom(float d) { float dist = (position() - mTarget).norm();