Verified Commit b0660863 authored by Josch Morgenstern's avatar Josch Morgenstern
Browse files

[#42] remove camera & window from controller

parent 48081157
......@@ -10,11 +10,6 @@ namespace vkcv {
* #PilotCameraController.
*/
class CameraController {
protected:
Camera* m_camera;
Window* m_window;
double m_lastX;
double m_lastY;
public:
......@@ -23,29 +18,11 @@ namespace vkcv {
*/
CameraController() = default;
/**
* @brief Gets the camera object.
* @return The camera object.
*/
Camera& getCamera();
/**
* @brief Sets @p camera as the new camera object.
* @param camera The new camera object.
*/
virtual void setCamera(Camera &camera);
/**
* @brief Sets @p window as the new window object.
* @param window The new window object.
*/
void setWindow(Window &window);
/**
* @brief Updates the camera object in respect to @p deltaTime.
* @param deltaTime The time that has passed since last update.
*/
virtual void updateCamera(double deltaTime);
virtual void updateCamera(double deltaTime, Camera &camera);
/**
* @brief A callback function for key events.
......@@ -54,21 +31,21 @@ namespace vkcv {
* @param[in] action The key action.
* @param[in] mods The modifier bits.
*/
virtual void keyCallback(int key, int scancode, int action, int mods);
virtual void keyCallback(int key, int scancode, int action, int mods, Camera &camera);
/**
* @brief A callback function for mouse scrolling events.
* @param[in] offsetX The offset in horizontal direction.
* @param[in] offsetY The offset in vertical direction.
*/
virtual void scrollCallback( double offsetX, double offsetY);
virtual void scrollCallback( double offsetX, double offsetY, Camera &camera);
/**
* @brief A callback function for mouse movement events.
* @param[in] x The horizontal mouse position.
* @param[in] y The vertical mouse position.
*/
virtual void mouseMoveCallback(double offsetX, double offsetY);
virtual void mouseMoveCallback(double offsetX, double offsetY, Camera &camera);
/**
* @brief A callback function for mouse button events.
......@@ -76,7 +53,7 @@ namespace vkcv {
* @param[in] action The button action.
* @param[in] mods The modifier bits.
*/
virtual void mouseButtonCallback(int button, int action, int mods);
virtual void mouseButtonCallback(int button, int action, int mods, Camera &camera);
};
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment