erebus

diff liberebus/src/scene.h @ 8:e2d9bf168a41

semi-works ...
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 06:12:57 +0300
parents 93894c232d65
children 6204e4d3f445
line diff
     1.1 --- a/liberebus/src/scene.h	Sat May 24 02:27:08 2014 +0300
     1.2 +++ b/liberebus/src/scene.h	Sat May 24 06:12:57 2014 +0300
     1.3 @@ -4,9 +4,20 @@
     1.4  #include <vector>
     1.5  #include "snode.h"
     1.6  #include "camera.h"
     1.7 +#include "color.h"
     1.8 +
     1.9 +struct Environment {
    1.10 +	Color bgcolor;
    1.11 +	Color ambient;
    1.12 +	// TODO map & image-based lighting
    1.13 +
    1.14 +	Environment();
    1.15 +};
    1.16  
    1.17  class Scene {
    1.18  private:
    1.19 +	Environment env;
    1.20 +
    1.21  	std::vector<Object*> objects;
    1.22  	std::vector<SceneNode*> nodes;
    1.23  
    1.24 @@ -18,6 +29,13 @@
    1.25  	Scene();
    1.26  	~Scene();
    1.27  
    1.28 +	void set_env(const Environment &env);
    1.29 +	Environment &get_env();
    1.30 +	const Environment &get_env() const;
    1.31 +
    1.32 +	Color get_env_color() const;
    1.33 +	Color get_env_color(const Ray &ray) const;
    1.34 +
    1.35  	void add_object(Object *obj);
    1.36  	int get_object_count() const;
    1.37  	Object *get_object(int idx) const;