opengl demo, now working:

- quaternion vs euler angles interpolation (though the Euler angle version looks a bit too bad)
 - navigation using either a mapping from 2D screen coordinates to 3D points on a sphere
   or the standard approach mapping mouse displacements as rotations around camera's axes.
This commit is contained in:
Gael Guennebaud
2008-09-09 23:17:14 +00:00
parent 146c9e4494
commit 5e9ee8863e
4 changed files with 171 additions and 82 deletions

View File

@@ -205,18 +205,6 @@ void Camera::localTranslate(const Vector3f& t)
mViewIsUptodate = false;
}
void Camera::localRotate(float dTheta, float dPhi)
{
float dist = (position() - mTarget).norm();
setOrientation( AngleAxisf(dTheta, up())
* AngleAxisf(dPhi, right())
* orientation());
mTarget = position() + dist * direction();
mViewIsUptodate = false;
}
void Camera::updateViewMatrix(void) const
{
if(!mViewIsUptodate)