Adapted level to new camera implementation.

This commit is contained in:
Faerbit 2014-11-13 17:19:56 +01:00
parent 497a0b060c
commit 1050e6072f
2 changed files with 6 additions and 5 deletions

View File

@ -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<Light> Level::getLights() {
return lights;
}
glm::vec3 Level::getCameraPosition() {
return cameraPosition;
Camera Level::getCamera() {
return camera;
}
Object* Level::getCameraCenter() {

View File

@ -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<Light> getLights();
glm::vec3 getCameraPosition();
Object* getCameraCenter();
Camera getCamera();
private:
std::string filePath;
std::vector<Object> objects;
std::vector<Light> lights;
glm::vec3 ambientLight;
Object* cameraCenter;
glm::vec3 cameraPosition;
Camera camera;
Terrain terrain;
};