Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95207446
scene.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Dec 13, 18:04
Size
1 KB
Mime Type
text/x-c
Expires
Sun, Dec 15, 18:04 (2 d)
Engine
blob
Format
Raw Data
Handle
22932068
Attached To
rSYMKIT symkit
scene.h
View Options
#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
Log In to Comment