|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
|
|
#include <components/resource/resourcesystem.hpp>
|
|
|
|
|
#include <components/resource/scenemanager.hpp>
|
|
|
|
|
#include <components/settings/values.hpp>
|
|
|
|
|
|
|
|
|
|
#include "chunkmanager.hpp"
|
|
|
|
|
#include "compositemaprenderer.hpp"
|
|
|
|
@ -17,7 +18,7 @@ namespace Terrain
|
|
|
|
|
|
|
|
|
|
World::World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem,
|
|
|
|
|
Storage* storage, unsigned int nodeMask, unsigned int preCompileMask, unsigned int borderMask,
|
|
|
|
|
ESM::RefId worldspace)
|
|
|
|
|
ESM::RefId worldspace, double expiryDelay)
|
|
|
|
|
: mStorage(storage)
|
|
|
|
|
, mParent(parent)
|
|
|
|
|
, mResourceSystem(resourceSystem)
|
|
|
|
@ -45,9 +46,9 @@ namespace Terrain
|
|
|
|
|
|
|
|
|
|
mParent->addChild(mTerrainRoot);
|
|
|
|
|
|
|
|
|
|
mTextureManager = std::make_unique<TextureManager>(mResourceSystem->getSceneManager());
|
|
|
|
|
mChunkManager = std::make_unique<ChunkManager>(
|
|
|
|
|
mStorage, mResourceSystem->getSceneManager(), mTextureManager.get(), mCompositeMapRenderer, mWorldspace);
|
|
|
|
|
mTextureManager = std::make_unique<TextureManager>(mResourceSystem->getSceneManager(), expiryDelay);
|
|
|
|
|
mChunkManager = std::make_unique<ChunkManager>(mStorage, mResourceSystem->getSceneManager(),
|
|
|
|
|
mTextureManager.get(), mCompositeMapRenderer, mWorldspace, expiryDelay);
|
|
|
|
|
mChunkManager->setNodeMask(nodeMask);
|
|
|
|
|
mCellBorder
|
|
|
|
|
= std::make_unique<CellBorder>(this, mTerrainRoot.get(), borderMask, mResourceSystem->getSceneManager());
|
|
|
|
|