diff --git a/level.cc b/level.cc index f31db31..91a47a1 100644 --- a/level.cc +++ b/level.cc @@ -13,7 +13,7 @@ Level::~Level() { void Level::load(ACGL::OpenGL::SharedShaderProgram shader) { // currently hard coded should later read this stuff out of a file - cameraPosition = glm::vec3(0.0f, 0.0f, 0.0f); + this->camera = Camera(glm::vec3(0.0f, 0.0f, 0.0f), 1.0f); // load the geometry of the stanford bunny and build a VAO: Model model = Model("Bunny.obj", 0.25f); // load a texture: @@ -54,8 +54,8 @@ std::vector Level::getLights() { return lights; } -glm::vec3 Level::getCameraPosition() { - return cameraPosition; +Camera Level::getCamera() { + return camera; } Object* Level::getCameraCenter() { diff --git a/level.hh b/level.hh index d88086c..e472536 100644 --- a/level.hh +++ b/level.hh @@ -7,6 +7,7 @@ #include "entity.hh" #include "terrain.hh" #include "material.hh" +#include "camera.hh" class Level { public: @@ -18,15 +19,15 @@ class Level { void render(); glm::vec3 getAmbientLight(); std::vector getLights(); - glm::vec3 getCameraPosition(); Object* getCameraCenter(); + Camera getCamera(); private: std::string filePath; std::vector objects; std::vector lights; glm::vec3 ambientLight; Object* cameraCenter; - glm::vec3 cameraPosition; + Camera camera; Terrain terrain; };