Remove projection offset, add the hmd head matrix. Also tidy up a few things.

This commit is contained in:
James Urquhart 2016-05-18 00:18:02 +01:00
parent e7bafe3c7b
commit f91aa639d6
20 changed files with 126 additions and 113 deletions

View file

@ -51,6 +51,9 @@ class SceneCameraState
/// The inverse of the frustum's transform stored here for caching.
MatrixF mWorldViewMatrix;
/// Actual head position (will be - eye pos)
MatrixF mHeadWorldViewMatrix;
/// The projection matrix.
MatrixF mProjectionMatrix;
@ -88,6 +91,9 @@ class SceneCameraState
/// Return the world-space view vector.
const Point3F& getViewDirection() const { return mViewDirection; }
/// Returns the world->view transform for the head (used to calculate various display metrics)
const MatrixF& getHeadWorldViewMatrix() const { return mHeadWorldViewMatrix; }
/// Return the view->world transform. This is a shortcut for getFrustum().getTransform().
const MatrixF& getViewWorldMatrix() const { return mFrustum.getTransform(); }