rayzor
annotate src/scene.h @ 11:fe94d9e986ae
optimized 16bpp swap_buffers
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 10 Apr 2014 08:42:33 +0300 |
parents | a826bf0fb169 |
children | d94a69933a71 |
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@1 | 6 #include "object.h" |
nuclear@1 | 7 #include "light.h" |
nuclear@1 | 8 #include "camera.h" |
nuclear@1 | 9 |
nuclear@1 | 10 class Scene { |
nuclear@1 | 11 private: |
nuclear@1 | 12 char *name; |
nuclear@1 | 13 vector<Object*> objects; |
nuclear@1 | 14 vector<Light*> lights; |
nuclear@1 | 15 vector<Camera*> cameras; |
nuclear@6 | 16 Camera *active_cam; |
nuclear@1 | 17 |
nuclear@1 | 18 public: |
nuclear@1 | 19 Scene(); |
nuclear@1 | 20 ~Scene(); |
nuclear@1 | 21 |
nuclear@1 | 22 void clear(); |
nuclear@1 | 23 |
nuclear@1 | 24 void set_name(const char *name); |
nuclear@1 | 25 const char *get_name() const; |
nuclear@1 | 26 |
nuclear@6 | 27 void add_object(Object *obj); |
nuclear@6 | 28 void add_light(Light *lt); |
nuclear@6 | 29 void add_camera(Camera *cam); |
nuclear@6 | 30 |
nuclear@6 | 31 int get_object_count() const; |
nuclear@6 | 32 int get_light_count() const; |
nuclear@6 | 33 int get_camera_count() const; |
nuclear@6 | 34 |
nuclear@6 | 35 Object *get_object(int idx); |
nuclear@6 | 36 const Object *get_object(int idx) const; |
nuclear@6 | 37 Light *get_light(int idx); |
nuclear@6 | 38 const Light *get_light(int idx) const; |
nuclear@6 | 39 Camera *get_camera(int idx); |
nuclear@6 | 40 const Camera *get_camera(int idx) const; |
nuclear@6 | 41 |
nuclear@1 | 42 void draw() const; |
nuclear@1 | 43 }; |
nuclear@1 | 44 |
nuclear@1 | 45 #endif // SCENE_H_ |