00001
00002
00003 #ifndef __SCENE_H
00004 #define __SCENE_H
00005
00006 #include <gra/GRAObject.h>
00007 #include <esg/Definitions.h>
00008 #include <esg/SceneGraphObject.h>
00009 #include <esg/spacesorting/SDS.h>
00010 #include <esg/parser/Parser.h>
00011 #include <esg/Group.h>
00012 #include <gra/camera/Camera.h>
00013 #include <esg/brdf/BRDF.h>
00014 #include <esg/energy/PhotonMap.h>
00015
00016 namespace gra {
00017
00018 class GRA_EXPORT Scene : public GRAObject {
00019 protected:
00020 SceneGraphObject::OID _lastOID;
00021 Group _sceneGraph;
00022 bool _haveLight;
00023
00024 public:
00028 Scene (const SDS & proto)
00029 : _lastOID(0), _sceneGraph(proto), _haveLight(false) {
00030 _sceneGraph.setOID(_lastOID++);
00031 }
00032
00033 virtual ~Scene() {}
00034
00041 SceneGraphObject::OID appendModel(Parser& parser,
00042 const Matrix4* m = NULL);
00043
00049 SceneGraphObject::OID appendObject(SceneGraphObject* primitive);
00050
00056 SceneGraphObject::OID appendLight(LightSource* light);
00057
00065 void build(void) { _sceneGraph.build(); }
00066
00070 bool haveLight(void) const { return _haveLight; }
00071
00075 Group* root(void) { return &_sceneGraph; }
00076
00080 virtual void __debug (void);
00081 };
00082
00083 }
00084
00085 #endif // __SCENE_H