X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FCamera.hh;h=63d00749555a13c2052027dc8b0bb069e4856ecc;hp=0aa5dc9990cf5c3f97f23b0db1b76467e91fc143;hb=72d4af22710317acffab861421c4364b1780b6fe;hpb=493ddb59a8620b49dfa0ff62ce93395ebfd02e86 diff --git a/src/Moof/Camera.hh b/src/Moof/Camera.hh index 0aa5dc9..63d0074 100644 --- a/src/Moof/Camera.hh +++ b/src/Moof/Camera.hh @@ -47,19 +47,22 @@ public: position_(0.0, 0.0, 0.0) { quaternion_rotation_world_y(rotation_, 0.0); - srcRotation_ = rotation_; - dstRotation_ = rotation_; calculateSecondary(); } void setPosition(const Vector3& point); void setRotation(const Quaternion& rotation); + void setProjection(const Matrix4& projection); + void setProjection(Scalar fovy, Scalar aspect, Scalar near, Scalar far); + + void uploadProjectionToGL() const; + void lookAt(const Vector3& point); - const Matrix4& getTransformation() const + const Matrix4& getModelviewMatrix() const { - return transformation_; + return modelview_; } const Frustum& getFrustum() const @@ -73,15 +76,12 @@ public: private: Vector3 position_; Quaternion rotation_; + Matrix4 projection_; - Matrix4 transformation_; + Matrix4 modelview_; Frustum frustum_; Lerpv3 pInterp_; - - Quaternion srcRotation_; - Quaternion dstRotation_; - Scalar tInterp_; };