Added getCameraPosition to Level because it is used very often.

This commit is contained in:
Faerbit 2014-11-19 01:57:38 +01:00
parent 49dfdff413
commit 7d0cf9fca2
2 changed files with 5 additions and 0 deletions

View File

@ -133,3 +133,7 @@ Object* Level::getCameraCenter() {
Light* Level::getDirectionalLight() {
return &directionalLight;
}
glm::vec3 Level::getCameraPosition() {
return cameraCenter->getPosition() + camera.getVector();
}

View File

@ -23,6 +23,7 @@ class Level {
std::vector<Light> getLights();
Object* getCameraCenter();
Camera* getCamera();
glm::vec3 getCameraPosition();
private:
std::string filePath;
std::vector<Object> objects;