Skip to content
Snippets Groups Projects
Commit 399036df authored by Vanessa Karolek's avatar Vanessa Karolek
Browse files

[#42][Doc] add documentation for CameraManager class

parent 637e6a7b
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
......@@ -24,17 +24,64 @@ namespace vkcv{
double m_lastX ;
double m_lastY ;
/**
* @brief Binds the camera object to the window event handles
*/
void bindCamera();
/**
* @brief A callback function for key events. Currently, camera movement via W, A, S, D and window closure via Escape are supported
* @param[in] key The keyboard key
* @param[in] scancode The platform-specific scancode
* @param[in] action The key action
* @param[in] mods The modifier bits
*/
void keyCallback(int key, int scancode, int action, int mods);
/**
* @brief A callback function for mouse scrolling events. Currently, this leads to changes in the field of view of the camera object
* @param[in] offsetX The offset in horizontal direction
* @param[in] offsetY The offset in vertical direction
*/
void scrollCallback( double offsetX, double offsetY);
/**
* @brief A callback function for mouse movement events. Currently, this leads to panning the view of the camera, if @fn mouseButtonCallback(int button, int action, int mods) enabled panning.
* @param[in] offsetX The offset in horizontal direction
* @param[in] offsetY The offset in vertical direction
*/
void mouseMoveCallback( double offsetX, double offsetY);
/**
* @brief A callback function for mouse button events. Currently, the right mouse button enables panning the view of the camera as long as it is pressed.
* @param[in] button The mouse button
* @param[in] action The button action
* @param[in] mods The modifier bits
*/
void mouseButtonCallback(int button, int action, int mods);
public:
/**
* @brief The constructor
* @param[in] window The window
* @param[in] width The width of the window
* @param[in] height The height of the window
* @param[in] up The up vector of the camera. Per default: @code{.cpp} up = glm::vec3(0.0f, -1.0f, 0.0f) @endcode
* @param[in] position The position of the camera. Per default: @code{.cpp} position = glm::vec3(0.0f,0.0f,0.0f) @endcode
*/
CameraManager(Window &window, float width, float height, glm::vec3 up = glm::vec3(0.0f,-1.0f,0.0f), glm::vec3 position = glm::vec3(0.0f,0.0f,0.0f));
/**
* @brief Gets the camera object
* @return The camera object
*/
Camera& getCamera();
/**
* @brief Gets the trackball camera object
* @return The trackball camera object
*/
TrackballCamera& getTrackballCamera();
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment