Changeset 2124 for GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader
- Timestamp:
- 02/19/07 02:51:22 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader
- Files:
-
- 4 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/include/ObjReader.h
r2123 r2124 9 9 namespace GtpVisibilityPreprocessor { 10 10 class Intersectable; 11 class Preprocessor; 11 12 } 12 13 … … 31 32 Ogre::SceneManager *mSceneManager; 32 33 GtpVisibilityPreprocessor::ObjectContainer mPvsObjects; 34 GtpVisibilityPreprocessor::Preprocessor *mPreprocessor; 33 35 }; 34 36 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.cpp
r2123 r2124 13 13 14 14 ObjReader::ObjReader(Ogre::SceneManager *sceneManager): 15 mSceneManager(sceneManager) 16 {} 15 mSceneManager(sceneManager), mPreprocessor(NULL) 16 { 17 } 17 18 18 19 … … 20 21 { 21 22 CLEAR_CONTAINER(mPvsObjects); 23 24 DEL_PTR(mPreprocessor); 22 25 } 23 26 … … 29 32 GtpVisibilityPreprocessor::Debug.open("debug.log"); 30 33 // HACK: get any preprocessor to load file 31 GtpVisibilityPreprocessor::Preprocessor *preprocessor = 34 // note should be preserved to allow manual mesh reloading, 35 // but then geometry has to be stored two times 36 mPreprocessor = 32 37 GtpVisibilityPreprocessor::PreprocessorFactory::CreatePreprocessor("vss"); 33 38 34 39 // hack 35 preprocessor->mLoadMeshes = false;40 mPreprocessor->mLoadMeshes = false; 36 41 37 42 Ogre::LogManager::getSingleton().logMessage("loading obj scene"); 38 43 39 if ( preprocessor->LoadScene(sceneName))44 if (mPreprocessor->LoadScene(sceneName)) 40 45 { 41 46 Ogre::LogManager::getSingleton().logMessage("scene loaded, loading objects"); 42 47 // form objects from the scene triangles 43 if (! preprocessor->LoadObjects(visibilitySolution, mPvsObjects, preprocessor->mObjects))48 if (!mPreprocessor->LoadObjects(visibilitySolution, mPvsObjects, mPreprocessor->mObjects)) 44 49 { 45 50 Ogre::LogManager::getSingleton().logMessage("objects cannot be loaded"); … … 54 59 55 60 std::stringstream d; 56 d << "successfully loaded " << mPvsObjects.size() << " objects from " << preprocessor->mObjects.size() << " preprocessor objects"; 61 d << "successfully loaded " << (int)mPvsObjects.size() 62 << " objects from " << (int)mPreprocessor->mObjects.size() << " preprocessor objects"; 57 63 58 64 Ogre::LogManager::getSingleton().logMessage(d.str()); … … 65 71 if (i % 5000 == 4999) 66 72 { 67 d << i << " objects created" << endl; 73 d << i << " objects created"; 74 Ogre::LogManager::getSingleton().logMessage(d.str()); 68 75 } 69 76 … … 84 91 } 85 92 86 delete preprocessor;93 //delete preprocessor; 87 94 88 95 return true;
Note: See TracChangeset
for help on using the changeset viewer.