]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Camera.hh
improved new vorbisfile compatibility
[chaz/yoink] / src / Moof / Camera.hh
index 8b3b1dabe12e2760612b25554cf3c5007cb22dcf..b5927f438e0d3e27f376f8e5a559da6e5d9190f5 100644 (file)
@@ -30,6 +30,7 @@
 #define _MOOF_CAMERA_HH_
 
 #include <Moof/Event.hh>
+#include <Moof/Frustum.hh>
 #include <Moof/Interpolator.hh>
 #include <Moof/Math.hh>
 
@@ -45,37 +46,42 @@ public:
        Camera() :
                position_(0.0, 0.0, 0.0)
        {
-               quaternion_rotation_world_y(rotation_, 0.0);
-               srcRotation_ = rotation_;
-               dstRotation_ = rotation_;
+               cml::quaternion_rotation_world_y(rotation_, 0.0f);
                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_;
        }
 
-       void adjustFromInput(const Event& event);
+       const Frustum& getFrustum() const
+       {
+               return frustum_;
+       }
 
+       void handleEvent(const Event& event);
        void update(Scalar t, Scalar dt);
 
 private:
        Vector3         position_;
        Quaternion      rotation_;
+       Matrix4         projection_;
 
-       Matrix4         transformation_;
-
-       Lerpv3          pInterp_;
+       Matrix4         modelview_;
+       Frustum         frustum_;
 
-       Quaternion      srcRotation_;
-       Quaternion      dstRotation_;
-       Scalar          tInterp_;
+       Lerp3           pInterp_;
 };
 
 
This page took 0.023189 seconds and 4 git commands to generate.