rayzor

annotate src/scene.h @ 14:a9a948809c6f

starting the renderer screen, plus misc stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 13 Apr 2014 08:06:21 +0300
parents d94a69933a71
children be616b58df99
rev   line source
nuclear@1 1 #ifndef SCENE_H_
nuclear@1 2 #define SCENE_H_
nuclear@1 3
nuclear@1 4 #include <string>
nuclear@1 5 #include <vector.h>
nuclear@13 6 #include "snode.h"
nuclear@1 7 #include "object.h"
nuclear@1 8 #include "light.h"
nuclear@1 9 #include "camera.h"
nuclear@1 10
nuclear@1 11 class Scene {
nuclear@1 12 private:
nuclear@1 13 char *name;
nuclear@12 14 vector<SceneNode*> nodes;
nuclear@12 15
nuclear@1 16 vector<Object*> objects;
nuclear@1 17 vector<Light*> lights;
nuclear@1 18 vector<Camera*> cameras;
nuclear@6 19 Camera *active_cam;
nuclear@1 20
nuclear@12 21 vector<int> sel;
nuclear@12 22
nuclear@1 23 public:
nuclear@1 24 Scene();
nuclear@1 25 ~Scene();
nuclear@1 26
nuclear@1 27 void clear();
nuclear@1 28
nuclear@1 29 void set_name(const char *name);
nuclear@1 30 const char *get_name() const;
nuclear@1 31
nuclear@12 32 void add(SceneNode *node);
nuclear@6 33
nuclear@12 34 int get_node_count() const;
nuclear@6 35 int get_object_count() const;
nuclear@6 36 int get_light_count() const;
nuclear@6 37 int get_camera_count() const;
nuclear@6 38
nuclear@12 39 SceneNode *get_node(int idx);
nuclear@12 40 const SceneNode *get_node(int idx) const;
nuclear@6 41 Object *get_object(int idx);
nuclear@6 42 const Object *get_object(int idx) const;
nuclear@6 43 Light *get_light(int idx);
nuclear@6 44 const Light *get_light(int idx) const;
nuclear@6 45 Camera *get_camera(int idx);
nuclear@6 46 const Camera *get_camera(int idx) const;
nuclear@6 47
nuclear@1 48 void draw() const;
nuclear@12 49
nuclear@12 50 void select(int s);
nuclear@12 51 void clear_selection();
nuclear@12 52 int get_selection_count() const;
nuclear@12 53 int get_selection(int idx = 0) const;
nuclear@1 54 };
nuclear@1 55
nuclear@1 56 #endif // SCENE_H_