nuclear@2: #ifndef SCENE_H_ nuclear@2: #define SCENE_H_ nuclear@2: nuclear@2: #include nuclear@2: #include "snode.h" nuclear@2: #include "camera.h" nuclear@2: nuclear@2: class Scene { nuclear@2: private: nuclear@2: std::vector objects; nuclear@2: std::vector nodes; nuclear@2: nuclear@4: SceneNode *root; nuclear@4: nuclear@2: Camera *active_cam; nuclear@2: nuclear@2: public: nuclear@2: Scene(); nuclear@2: ~Scene(); nuclear@2: nuclear@2: void add_object(Object *obj); nuclear@2: int get_object_count() const; nuclear@2: Object *get_object(int idx) const; nuclear@2: nuclear@2: void add_node(SceneNode *node); nuclear@2: int get_node_count() const; nuclear@2: SceneNode *get_node(int idx) const; nuclear@2: nuclear@4: void use_camera(Camera *cam); nuclear@4: Camera *get_active_camera() const; nuclear@4: nuclear@4: void update(long msec = 0); nuclear@4: nuclear@2: bool intersect(const Ray &ray, RayHit *hit) const; nuclear@4: nuclear@4: bool load(const char *fname); nuclear@2: }; nuclear@2: nuclear@2: #endif // SCENE_H_