erebus

annotate 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
rev   line source
nuclear@2 1 #ifndef SCENE_H_
nuclear@2 2 #define SCENE_H_
nuclear@2 3
nuclear@2 4 #include <vector>
nuclear@2 5 #include "snode.h"
nuclear@2 6 #include "camera.h"
nuclear@2 7
nuclear@2 8 class Scene {
nuclear@2 9 private:
nuclear@2 10 std::vector<Object*> objects;
nuclear@2 11 std::vector<SceneNode*> nodes;
nuclear@2 12
nuclear@4 13 SceneNode *root;
nuclear@4 14
nuclear@2 15 Camera *active_cam;
nuclear@2 16
nuclear@2 17 public:
nuclear@2 18 Scene();
nuclear@2 19 ~Scene();
nuclear@2 20
nuclear@2 21 void add_object(Object *obj);
nuclear@2 22 int get_object_count() const;
nuclear@2 23 Object *get_object(int idx) const;
nuclear@2 24
nuclear@2 25 void add_node(SceneNode *node);
nuclear@2 26 int get_node_count() const;
nuclear@2 27 SceneNode *get_node(int idx) const;
nuclear@2 28
nuclear@4 29 void use_camera(Camera *cam);
nuclear@4 30 Camera *get_active_camera() const;
nuclear@4 31
nuclear@4 32 void update(long msec = 0);
nuclear@4 33
nuclear@2 34 bool intersect(const Ray &ray, RayHit *hit) const;
nuclear@4 35
nuclear@4 36 bool load(const char *fname);
nuclear@2 37 };
nuclear@2 38
nuclear@2 39 #endif // SCENE_H_