mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user