]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Camera.hh
scene drawing correctly implemented; new classes
[chaz/yoink] / src / Moof / Camera.hh
index 8800e3baf1fbf0b9f925d893459805df547988e0..8b3b1dabe12e2760612b25554cf3c5007cb22dcf 100644 (file)
 #ifndef _MOOF_CAMERA_HH_
 #define _MOOF_CAMERA_HH_
 
+#include <Moof/Event.hh>
+#include <Moof/Interpolator.hh>
+#include <Moof/Math.hh>
+
 
 namespace Mf {
 
 
 class Camera
 {
+       void calculateSecondary();
+
 public:
+       Camera() :
+               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 lookAt(const Vector3& point);
+
+       const Matrix4& getTransformation() const
+       {
+               return transformation_;
+       }
+
+       void adjustFromInput(const Event& event);
+
+       void update(Scalar t, Scalar dt);
+
 private:
+       Vector3         position_;
+       Quaternion      rotation_;
+
+       Matrix4         transformation_;
+
+       Lerpv3          pInterp_;
+
+       Quaternion      srcRotation_;
+       Quaternion      dstRotation_;
+       Scalar          tInterp_;
 };
 
 
This page took 0.020453 seconds and 4 git commands to generate.