#ifndef _SceneGraph_H__ #define _SceneGraph_H__ #include // #include "Containers.h" #include "AxisAlignedBox3.h" namespace GtpVisibilityPreprocessor { /** Basic scene graph node, we are interested only in bounding boxes and topology of the scene graph */ class SceneGraphNode { public: ObjectContainer mGeometry; SceneGraphNodeContainer mChildren; AxisAlignedBox3 mBox; ~SceneGraphNode(); void UpdateBox(); }; /** Scene graph class */ class SceneGraph { public: SceneGraph(); ~SceneGraph(); bool Export(const std::string filename); int CollectObjects(ObjectContainer *instances); int AssignObjectIds(); void GetStatistics(int &intersectables, int &faces) const; AxisAlignedBox3 GetBox() const { return mRoot->mBox; } /** Exports binary version of the scene. */ void ExportScene(const std::string filename); /** Loads binary version of the scene. */ void LoadScene(const std::string filename); SceneGraphNode *GetRoot(); void SetRoot(SceneGraphNode *sgNnode); protected: SceneGraphNode *mRoot; }; } #endif