#ifndef __CameraManipulator__
#define __CameraManipulator__

#ifndef CORE_DLL 
    #ifdef CORE_BUILD
	    #define CORE_DLL __declspec(dllexport)
    #else
	    #define CORE_DLL __declspec(dllimport)
        #pragma comment(lib, "Core.lib")
    #endif
#endif


#include "../../Core/mathlib.h"
#include "../../Core/SharedResource.h"
#include "../../WindowManager/Event.h"
#include "Camera.h"


class CORE_DLL CameraManipulator : public SharedResource {
public:
    enum Keys {
        MoveForward = 1,
        MoveBackward,
        MoveLeft,
        MoveRight
    };

    CameraManipulator(Camera* camera = 0);

    virtual void handleEvent(Event& event) = 0;

    virtual void update(float elapsedTime) = 0;

    Camera* getCamera();
    void setCamera(Camera* camera);
    
protected:
    static float _mouseSensitivity;
    static float _mouseSmoothingInterval;
    static int   _keyBindings[256];

    Camera* _camera;
    bool _active;

    float _speed;

    Vector3 _eye;
    Vector3 _center;
};

#endif