diff --git a/modules/camera/include/vkcv/camera/CameraManager.hpp b/modules/camera/include/vkcv/camera/CameraManager.hpp index b7e1554bf8b07faf16ea841ff054a1a337f1fe12..acaa6bcf4135463a5c48aa1ea118a20f7b90b1ad 100644 --- a/modules/camera/include/vkcv/camera/CameraManager.hpp +++ b/modules/camera/include/vkcv/camera/CameraManager.hpp @@ -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 * @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. */ int addCamera(ControllerType controllerType); diff --git a/modules/camera/src/vkcv/camera/CameraManager.cpp b/modules/camera/src/vkcv/camera/CameraManager.cpp index 67e3abb1e5d4e21f4997af554547755c6b7044c2..a8c01861db0769dbbe75bccbd7830e3319a28d6d 100644 --- a/modules/camera/src/vkcv/camera/CameraManager.cpp +++ b/modules/camera/src/vkcv/camera/CameraManager.cpp @@ -43,15 +43,12 @@ namespace vkcv{ void CameraManager::mouseMoveCallback(double x, double y){ auto xoffset = static_cast<float>(x - m_lastX); auto yoffset = static_cast<float>(y - m_lastY); - m_lastX = x; m_lastY = y; - getControllerByType(getControllerType(getActiveCameraIndex())).mouseMoveCallback(xoffset, yoffset, getActiveCamera()); } void CameraManager::scrollCallback(double offsetX, double offsetY) { - getControllerByType(getControllerType(getActiveCameraIndex())).scrollCallback(offsetX, offsetY, getActiveCamera()); } @@ -74,12 +71,11 @@ namespace vkcv{ default: getControllerByType(getControllerType(getActiveCameraIndex())).keyCallback(key, scancode, action, mods, getActiveCamera()); } - } int CameraManager::addCamera() { 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_cameraControllerTypes.push_back(ControllerType::NONE); return m_cameras.size() - 1;