Skip to content
Snippets Groups Projects
Commit 91b8cede authored by Adam Štěpánek's avatar Adam Štěpánek
Browse files

Position Juno

parent 11195a03
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,12 @@ Application::Application(size_t initialWidth, size_t initialHeight) {
galileo.modelMatrix() = glm::rotate(galileo.modelMatrix(), 3.14159f / 16.0f, glm::vec3(1.0, 0.0, 0.0));
galileo.modelMatrix() = glm::rotate(galileo.modelMatrix(), -3.14159f / 16.0f, glm::vec3(0.0, 0.0, 1.0));
cassini.modelMatrix() = glm::scale(cassini.modelMatrix(), glm::vec3(0.2f));
juno.modelMatrix() = glm::scale(juno.modelMatrix(), glm::vec3(0.1f));
juno.modelMatrix() = glm::rotate(juno.modelMatrix(), -3.14159f / 4.0f, glm::vec3(0.0, 1.0, 0.0));
juno.modelMatrix() = glm::rotate(juno.modelMatrix(), 3.14159f / 2.0f, glm::vec3(1.0, 0.0, 0.0));
glCreateBuffers(1, &cameraBuffer);
glNamedBufferStorage(cameraBuffer, sizeof(CameraUBO), &cameraUbo, GL_DYNAMIC_STORAGE_BIT);
......@@ -83,6 +89,8 @@ void Application::render() {
voyager.update();
ulysses.update();
galileo.update();
cassini.update();
juno.update();
// Camera
if (followedProbe) {
......@@ -145,6 +153,8 @@ void Application::render() {
voyager.draw();
ulysses.draw();
galileo.draw();
cassini.draw();
juno.draw();
glUseProgram(drawLightsProgram.id());
......@@ -200,5 +210,11 @@ void Application::onKeyPressed(GLFWwindow *window, int key, int scancode, int ac
case GLFW_KEY_4:
followedProbe = &galileo;
break;
case GLFW_KEY_5:
followedProbe = &cassini;
break;
case GLFW_KEY_6:
followedProbe = &juno;
break;
}
}
\ No newline at end of file
......@@ -68,8 +68,8 @@ private:
Probe voyager = Probe("objects/voyager/voyager.obj", { 20.0f, 2.0f, 0.0f }, -0.1f, texturedObjectProgram, normalMappedObjectProgram);
Probe ulysses = Probe("objects/ulysses/ulysses.obj", { 20.0f, -3.0f, 20.0f }, 0.15f, texturedObjectProgram, normalMappedObjectProgram);
Probe galileo = Probe("objects/galileo/galileo.obj", { 8.0f, 6.0f, 8.0f }, -0.4f, texturedObjectProgram, normalMappedObjectProgram);
//Probe cassini = Probe("objects/cassini/cassini.obj", { 20.0f, 2.0f, 0.0f }, texturedObjectProgram, normalMappedObjectProgram);
//Probe juno = Probe("objects/juno/Juno.obj", { 20.0f, 2.0f, 0.0f }, texturedObjectProgram, normalMappedObjectProgram);
Probe cassini = Probe("objects/cassini/cassini.obj", { -10.0f, -4.0f, -10.0f }, -0.2f, texturedObjectProgram, normalMappedObjectProgram);
Probe juno = Probe("objects/juno/Juno.obj", { 25.0f, 0.5f, 25.0f }, -0.05f, texturedObjectProgram, normalMappedObjectProgram);
Material jupiterMaterial;
glm::mat4 jupiterModelMatrix;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment