00001
00002
00003
00004
00005
00006 #ifndef _CAMERA_H_
00007 #define _CAMERA_H_
00008
00014 #include <irrTypes.h>
00015 #include <vector3d.h>
00016 #include <position2d.h>
00017
00018 class World;
00019 class Object;
00020
00021 namespace irr
00022 {
00023 struct SEvent;
00024 class IrrlichtDevice;
00025
00026 namespace scene
00027 {
00028 class ICameraSceneNode;
00029 }
00030 }
00031
00032 class Camera
00033 {
00034 public:
00035 Camera(irr::scene::ICameraSceneNode *camera, Object *target, World *world);
00036
00037 virtual void update();
00038 virtual bool event(const irr::SEvent& e);
00039
00040 irr::scene::ICameraSceneNode* getNode() const;
00041 const irr::core::vector3df& getDirection() const;
00042
00043 float getYaw() const;
00044 float getPitch() const;
00045
00046 private:
00047 World *m_world;
00048 Object *m_target;
00049 irr::scene::ICameraSceneNode *m_camera;
00050
00051 bool m_moved;
00052 irr::core::position2df m_scale;
00053 irr::core::vector3df m_direction;
00054 irr::f32 m_yaw, m_pitch, m_min, m_max, m_distance;
00055 };
00056
00057 #endif