#ifndef CSCENEMANAGER_h #define CSCENEMANAGER_h #include #include #include #include "CAreaAttributes.h" #include "CRenderer.h" #include "SViewInfo.h" #include #include #include #include #include #include #include #include #include #include #include class CSceneManager { bool mSplitTerrain; u32 mNodeCount; std::vector mModelNodes; std::vector mStaticNodes; std::vector mCollisionNodes; std::vector mScriptNodes; std::vector mLightNodes; CRootNode *mpSceneRootNode; TResPtr mpArea; TResPtr mpWorld; CRootNode *mpAreaRootNode; // Environment std::vector mAreaAttributesObjects; CAreaAttributes *mpActiveAreaAttributes; // Objects std::unordered_map mScriptNodeMap; public: CSceneManager(); ~CSceneManager(); // Scene Management CModelNode* AddModel(CModel *mdl); CStaticNode* AddStaticModel(CStaticModel *mdl); CCollisionNode* AddCollision(CCollisionMeshGroup *mesh); CScriptNode* AddScriptObject(CScriptObject *obj); CLightNode* AddLight(CLight *Light); void SetActiveArea(CGameArea *_area); void SetActiveWorld(CWorld *_world); void ClearScene(); void AddSceneToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); SRayIntersection SceneRayCast(const CRay& Ray, const SViewInfo& ViewInfo); void PickEnvironmentObjects(); CScriptNode* ScriptNodeByID(u32 InstanceID); CScriptNode* NodeForObject(CScriptObject *pObj); CLightNode* NodeForLight(CLight *pLight); // Setters/Getters CModel* GetActiveSkybox(); CGameArea* GetActiveArea(); }; #endif // CSCENEMANAGER_H