2014-10-20 16:38:29 +00:00
|
|
|
#ifndef LEVEL_HH_INCLUDED
|
|
|
|
#define LEVEL_HH_INCLUDED
|
|
|
|
|
|
|
|
#include <string>
|
2014-10-30 22:54:19 +00:00
|
|
|
#include "object.hh"
|
|
|
|
#include "light.hh"
|
2014-10-20 16:38:29 +00:00
|
|
|
#include "entity.hh"
|
2014-10-20 17:07:45 +00:00
|
|
|
#include "terrain.hh"
|
2014-11-08 00:17:23 +00:00
|
|
|
#include "material.hh"
|
2014-11-13 16:19:56 +00:00
|
|
|
#include "camera.hh"
|
2014-11-17 11:57:16 +00:00
|
|
|
#include "physics.hh"
|
2014-12-05 11:47:02 +00:00
|
|
|
#include "tinyxml2.hh"
|
2014-12-15 13:59:03 +00:00
|
|
|
#include "trigger.hh"
|
2014-10-20 16:38:29 +00:00
|
|
|
|
|
|
|
class Level {
|
|
|
|
public:
|
2014-12-04 14:07:31 +00:00
|
|
|
Level(std::string levelNum);
|
2014-10-30 22:54:19 +00:00
|
|
|
Level();
|
2014-10-20 16:38:29 +00:00
|
|
|
~Level();
|
2014-11-27 23:17:56 +00:00
|
|
|
void load();
|
2014-11-17 12:12:51 +00:00
|
|
|
void update(float runTime, glm::vec2 mouseDelta,bool wPressed, bool aPressed,bool sPressed, bool dPressed);
|
2014-12-15 11:41:30 +00:00
|
|
|
void render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass,
|
|
|
|
glm::mat4* viewProjectionMatrix, std::vector<glm::mat4>* shadowVPs=0);
|
2014-10-30 22:59:03 +00:00
|
|
|
glm::vec3 getAmbientLight();
|
2014-11-17 16:51:15 +00:00
|
|
|
Light* getDirectionalLight();
|
2014-12-15 00:12:51 +00:00
|
|
|
std::vector<Light>* getLights();
|
2014-11-13 00:22:33 +00:00
|
|
|
Object* getCameraCenter();
|
2014-11-15 13:54:44 +00:00
|
|
|
Camera* getCamera();
|
2014-11-19 00:57:38 +00:00
|
|
|
glm::vec3 getCameraPosition();
|
2014-12-12 14:41:17 +00:00
|
|
|
glm::vec4 getFogColour();
|
2014-11-21 23:39:58 +00:00
|
|
|
void setSkydomeSize(float size);
|
2014-12-16 11:19:48 +00:00
|
|
|
std::vector<Object*>* getObjects();
|
2014-10-20 16:38:29 +00:00
|
|
|
private:
|
2014-12-05 13:45:44 +00:00
|
|
|
void errorCheck(tinyxml2::XMLError error);
|
2014-12-04 14:07:31 +00:00
|
|
|
std::string levelNum;
|
2014-11-22 23:59:54 +00:00
|
|
|
std::vector<Object*> objects;
|
2014-11-28 11:06:17 +00:00
|
|
|
std::vector<Object*> physicObjects;
|
2014-10-30 22:54:19 +00:00
|
|
|
std::vector<Light> lights;
|
2014-12-15 13:59:03 +00:00
|
|
|
std::vector<Trigger> triggers;
|
2014-10-30 22:54:19 +00:00
|
|
|
glm::vec3 ambientLight;
|
2014-12-12 14:41:17 +00:00
|
|
|
glm::vec4 fogColour;
|
2014-11-17 16:51:15 +00:00
|
|
|
Light directionalLight;
|
2014-11-13 00:22:33 +00:00
|
|
|
Object* cameraCenter;
|
2014-11-22 23:57:16 +00:00
|
|
|
Object* skydome;
|
2014-11-17 11:57:16 +00:00
|
|
|
Physics physics;
|
2014-11-13 16:19:56 +00:00
|
|
|
Camera camera;
|
2014-10-20 17:07:45 +00:00
|
|
|
Terrain terrain;
|
2014-11-21 23:39:58 +00:00
|
|
|
float skydomeSize;
|
2015-01-06 12:14:30 +00:00
|
|
|
float strength;
|
2014-10-20 16:44:23 +00:00
|
|
|
};
|
2014-10-20 16:48:20 +00:00
|
|
|
|
|
|
|
#endif
|