mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
~ | Better camera managment
This commit is contained in:
@ -110,6 +110,18 @@ void Window::keyCallback(GLFWwindow *window, int key, int scancode, int action,
|
||||
{
|
||||
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
|
||||
(void) win; (void) key; (void) scancode; (void) action; (void) mods;
|
||||
|
||||
if (key == 67 && action == GLFW_PRESS)
|
||||
{
|
||||
glm::vec3 pos = win->_scene->getCamera()->getPosition();
|
||||
glm::vec2 dir = win->_scene->getCamera()->getDirection();
|
||||
glm::vec2 dov = win->_scene->getCamera()->getDOV();
|
||||
|
||||
std::cout << "\nCAM\t" << pos.x << " " << pos.y << " " << pos.z << "\t"
|
||||
<< dir.x << " " << dir.y << " " << "\t"
|
||||
<< dov.x << " " << dov.y << " " << "\t"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void Window::display()
|
||||
|
Reference in New Issue
Block a user