Page MenuHomec4science

scene.h
No OneTemporary

File Metadata

Created
Fri, Dec 13, 18:04
#ifndef __SCENE_H__
#define __SCENE_H__
/*
* This namespace manages all "low level"
* rendering state and functions
*
* Idea: All graphical components
* are contained in a "linked" list such that,
* for every frame and for each component
* its "update" method is called.
*
*
*
*/
/* Forward declarations */
class Shape;
class Camera;
/* This include is necessary!
* Forward declaration doesn't work for template types
*/
#include <list>
/* Iterator typedef to loop through all components */
typedef std::list<Shape*>::iterator obj_iter;
/* Graphics scene manager */
namespace scene
{
/* time unit setting, global variable */
extern float delta_time;
/* Init function for the symulation scene */
void initialize(Camera*);
/* Safely close the symulation scene */
void close();
/* Objects iterator */
obj_iter obj_beg();
/* End objects iterator */
obj_iter obj_end();
/* Get the camera instance */
Camera * camera();
/* Registers a object into the graphics engine (OpenGL) */
void registerObj(Shape*);
/* Unregister a object which is in the graphics engine (OpenGL) */
void unregisterObj(Shape*);
/* Unregister all object */
void unregisterAll();
/* Update the entire scene, called every frame */
void update(const float *dt = 0);
}
#endif

Event Timeline