diff --git a/include/PolyVoxSceneManager.h b/include/PolyVoxSceneManager.h index fb9520e8..5fa54247 100644 --- a/include/PolyVoxSceneManager.h +++ b/include/PolyVoxSceneManager.h @@ -66,9 +66,6 @@ namespace Ogre void setAllUpToDateFlagsTo(bool newUpToDateValue); void createSphereAt(Vector3 centre, Real radius, uchar value, bool painting); - - bool loadScene(const String& filename); - bool saveScene(const String& filename); void generateLevelVolume(void); @@ -101,7 +98,7 @@ namespace Ogre NormalGenerationMethod m_normalGenerationMethod; - VolumeResourcePtr volumeResource; + Volume* volumeData; bool m_bHaveGeneratedMeshes; diff --git a/source/PolyVoxSceneManager.cpp b/source/PolyVoxSceneManager.cpp index 76172e5b..59743786 100644 --- a/source/PolyVoxSceneManager.cpp +++ b/source/PolyVoxSceneManager.cpp @@ -37,8 +37,7 @@ namespace Ogre // PolyVoxSceneManager ////////////////////////////////////////////////////////////////////////// PolyVoxSceneManager::PolyVoxSceneManager() - :volumeResource(0) - ,volumeData(0) + :volumeData(0) ,useNormalSmoothing(false) ,normalSmoothingFilterSize(1) ,m_normalGenerationMethod(SOBEL) @@ -51,33 +50,6 @@ namespace Ogre { } - bool PolyVoxSceneManager::loadScene(const String& filename) - { - volumeResource = VolumeManager::getSingletonPtr()->load(filename + ".volume", "General"); - if(volumeResource.isNull()) - { - LogManager::getSingleton().logMessage("Generating default volume"); - generateLevelVolume(); - LogManager::getSingleton().logMessage("Done generating default volume"); - } - - volumeData = volumeResource->volume; - - volumeData->tidy(); - - - setAllUpToDateFlagsTo(false); - - - //createAxis(256); - //setAxisVisible(false); - - - - - return true; - } - std::list PolyVoxSceneManager::getChangedRegionGeometry(void) { std::list listChangedRegionGeometry; @@ -724,12 +696,6 @@ namespace Ogre markRegionChanged(0,0,0,OGRE_VOLUME_SIDE_LENGTH-1,OGRE_VOLUME_SIDE_LENGTH-1,OGRE_VOLUME_SIDE_LENGTH-1); } - bool PolyVoxSceneManager::saveScene(const String& filename) - { - volumeData->saveToFile(filename); - return true; //FIXME - check for error... - } - uint PolyVoxSceneManager::getSideLength(void) { return OGRE_VOLUME_SIDE_LENGTH;