Skip to content
Snippets Groups Projects
Commit 55d709f4 authored by Katharina Krämer's avatar Katharina Krämer
Browse files

[#94] reset spheres and initial camera to plane

parent 4304f8b2
No related branches found
No related tags found
1 merge request!77Resolve "SAF-R Module"
Pipeline #27200 passed
...@@ -119,7 +119,7 @@ Intersection sceneIntersect(const vec3 rayOrigin, const vec3 rayDirection) { ...@@ -119,7 +119,7 @@ Intersection sceneIntersect(const vec3 rayOrigin, const vec3 rayDirection) {
intersection.hit = true; intersection.hit = true;
intersection.pos = pt; intersection.pos = pt;
intersection.N = vec3(0, 1, 0); intersection.N = vec3(0, 1, 0);
intersection.material = inSpheres[1].material; intersection.material = inSpheres[2].material;
} }
} }
return intersection; return intersection;
......
...@@ -93,11 +93,11 @@ int main(int argc, const char** argv) { ...@@ -93,11 +93,11 @@ int main(int argc, const char** argv) {
//spheres for the scene //spheres for the scene
std::vector<safrScene::Sphere> spheres; std::vector<safrScene::Sphere> spheres;
spheres.push_back(safrScene::Sphere(glm::vec3(-3.0, 0.0, 16), 2, ivory)); spheres.push_back(safrScene::Sphere(glm::vec3(-3, 0, -16), 2, ivory));
// spheres.push_back(safrScene::Sphere(glm::vec3(-1.0, -1.5, 12), 2, mirror)); // spheres.push_back(safrScene::Sphere(glm::vec3(-1.0, -1.5, 12), 2, mirror));
spheres.push_back(safrScene::Sphere(glm::vec3(1.5, -0.5, 23), 2, mirror)); spheres.push_back(safrScene::Sphere(glm::vec3(-1.0, -1.5, -12), 2, mirror));
spheres.push_back(safrScene::Sphere(glm::vec3( 1.5, -0.5, 18), 3, red_rubber)); spheres.push_back(safrScene::Sphere(glm::vec3( 1.5, -0.5, -18), 3, red_rubber));
spheres.push_back(safrScene::Sphere(glm::vec3( 7.0, 5.0, 18), 4, mirror)); spheres.push_back(safrScene::Sphere(glm::vec3( 7, 5, -18), 4, mirror));
//lights for the scene //lights for the scene
std::vector<safrScene::Light> lights; std::vector<safrScene::Light> lights;
...@@ -190,7 +190,7 @@ int main(int argc, const char** argv) { ...@@ -190,7 +190,7 @@ int main(int argc, const char** argv) {
uint32_t camIndex0 = cameraManager.addCamera(vkcv::camera::ControllerType::PILOT); uint32_t camIndex0 = cameraManager.addCamera(vkcv::camera::ControllerType::PILOT);
uint32_t camIndex1 = cameraManager.addCamera(vkcv::camera::ControllerType::TRACKBALL); uint32_t camIndex1 = cameraManager.addCamera(vkcv::camera::ControllerType::TRACKBALL);
cameraManager.getCamera(camIndex0).setPosition(glm::vec3(0, 0, -2)); cameraManager.getCamera(camIndex0).setPosition(glm::vec3(0, 0, 2));
cameraManager.getCamera(camIndex1).setPosition(glm::vec3(0.0f, 0.0f, 0.0f)); cameraManager.getCamera(camIndex1).setPosition(glm::vec3(0.0f, 0.0f, 0.0f));
cameraManager.getCamera(camIndex1).setCenter(glm::vec3(0.0f, 0.0f, -1.0f)); cameraManager.getCamera(camIndex1).setCenter(glm::vec3(0.0f, 0.0f, -1.0f));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment