erebus
view liberebus/src/scene.h @ 6:bb006fb96f1b
forgot to add two files
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 24 May 2014 02:22:14 +0300 |
parents | 474a0244f57d |
children | e2d9bf168a41 |
line source
1 #ifndef SCENE_H_
2 #define SCENE_H_
4 #include <vector>
5 #include "snode.h"
6 #include "camera.h"
8 class Scene {
9 private:
10 std::vector<Object*> objects;
11 std::vector<SceneNode*> nodes;
13 SceneNode *root;
15 Camera *active_cam;
17 public:
18 Scene();
19 ~Scene();
21 void add_object(Object *obj);
22 int get_object_count() const;
23 Object *get_object(int idx) const;
25 void add_node(SceneNode *node);
26 int get_node_count() const;
27 SceneNode *get_node(int idx) const;
29 void use_camera(Camera *cam);
30 Camera *get_active_camera() const;
32 void update(long msec = 0);
34 bool intersect(const Ray &ray, RayHit *hit) const;
36 bool load(const char *fname);
37 };
39 #endif // SCENE_H_