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

[#42] remove already resolved todo, empty lines

parent 5fafcefe
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
...@@ -113,7 +113,7 @@ namespace vkcv { ...@@ -113,7 +113,7 @@ namespace vkcv {
/** /**
* @brief Adds a new camera object to the #CameraManager and binds it to a camera controller object of specified * @brief Adds a new camera object to the #CameraManager and binds it to a camera controller object of specified
* @p controllerType. * @p controllerType.
* @param controllerType The type of the camera controller * @param controllerType The type of the camera controller.
* @return The index of the newly created camera object. * @return The index of the newly created camera object.
*/ */
int addCamera(ControllerType controllerType); int addCamera(ControllerType controllerType);
......
...@@ -43,15 +43,12 @@ namespace vkcv{ ...@@ -43,15 +43,12 @@ namespace vkcv{
void CameraManager::mouseMoveCallback(double x, double y){ void CameraManager::mouseMoveCallback(double x, double y){
auto xoffset = static_cast<float>(x - m_lastX); auto xoffset = static_cast<float>(x - m_lastX);
auto yoffset = static_cast<float>(y - m_lastY); auto yoffset = static_cast<float>(y - m_lastY);
m_lastX = x; m_lastX = x;
m_lastY = y; m_lastY = y;
getControllerByType(getControllerType(getActiveCameraIndex())).mouseMoveCallback(xoffset, yoffset, getActiveCamera()); getControllerByType(getControllerType(getActiveCameraIndex())).mouseMoveCallback(xoffset, yoffset, getActiveCamera());
} }
void CameraManager::scrollCallback(double offsetX, double offsetY) { void CameraManager::scrollCallback(double offsetX, double offsetY) {
getControllerByType(getControllerType(getActiveCameraIndex())).scrollCallback(offsetX, offsetY, getActiveCamera()); getControllerByType(getControllerType(getActiveCameraIndex())).scrollCallback(offsetX, offsetY, getActiveCamera());
} }
...@@ -74,12 +71,11 @@ namespace vkcv{ ...@@ -74,12 +71,11 @@ namespace vkcv{
default: default:
getControllerByType(getControllerType(getActiveCameraIndex())).keyCallback(key, scancode, action, mods, getActiveCamera()); getControllerByType(getControllerType(getActiveCameraIndex())).keyCallback(key, scancode, action, mods, getActiveCamera());
} }
} }
int CameraManager::addCamera() { int CameraManager::addCamera() {
Camera camera; Camera camera;
m_cameras.push_back(camera); // TODO: is there another way we can do this? m_cameras.push_back(camera);
m_cameras.back().setPerspective(glm::radians(60.0f), m_window.getWidth() / m_window.getHeight(), 0.1f, 10.0f); m_cameras.back().setPerspective(glm::radians(60.0f), m_window.getWidth() / m_window.getHeight(), 0.1f, 10.0f);
m_cameraControllerTypes.push_back(ControllerType::NONE); m_cameraControllerTypes.push_back(ControllerType::NONE);
return m_cameras.size() - 1; return m_cameras.size() - 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment