00001
00002 #ifndef RC_WORLD_H
00003 #define RC_WORLD_H
00004
00008 class World : public Node {
00009 friend class SceneGraph;
00010
00011
00012
00013 protected:
00014 World(
00015 const char *nname
00016 );
00017
00018 ~World();
00019
00020 public:
00021
00027 void setActiveCamera(
00028 Camera *camera
00029 );
00030
00031 Camera *getActiveCamera();
00032
00034 void setClearColorBuffer(
00035 bool do_clear,
00036 vec4f color
00037 );
00038
00040 void setClearDepthBuffer(
00041 bool do_clear,
00042 f32 depth
00043 );
00044
00048 void setClearStencilBuffer(
00049 bool do_clear,
00050 i32 stencil
00051 );
00052
00054 void setViewport(
00055 i32 x,
00056 i32 y,
00057 u32 width,
00058 u32 height
00059 );
00060
00062 void setFullViewport();
00063
00073 void getKNNLights(
00074 Light **light_list,
00075 u32 *n_lights_found,
00076
00077 Sphere *search_volume,
00078 u32 kNN
00079
00080 );
00081
00082 void logInfo();
00083
00084 private:
00085
00086 Node *duplicateSelf();
00087
00088 void drawSelf();
00089
00090 void getKNNLightsRec(
00091 Light **light_list,
00092
00093 Sphere *search_volume,
00094 u32 kNN,
00095
00096 u32 *n,
00097 f32 *max_dist,
00098 Node *curr
00099
00100 );
00101
00102
00103
00104 private:
00105 Camera *activeCamera;
00106
00107 vec4f clearColor;
00108 f32 clearDepth;
00109 i32 clearStencil;
00110
00111 bool clearColorBuffer;
00112 bool clearDepthBuffer;
00113 bool clearStencilBuffer;
00114
00115 bool full_viewport;
00116 i32 viewport_x, viewport_y;
00117 u32 viewport_width, viewport_height;
00118
00119
00120 };
00121
00122
00123 #endif
00124