Ignore:
Timestamp:
02/19/07 02:51:22 (18 years ago)
Author:
mattausch
Message:
 
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  
    99namespace  GtpVisibilityPreprocessor { 
    1010class Intersectable; 
     11class Preprocessor; 
    1112} 
    1213 
     
    3132        Ogre::SceneManager *mSceneManager; 
    3233        GtpVisibilityPreprocessor::ObjectContainer mPvsObjects; 
     34        GtpVisibilityPreprocessor::Preprocessor *mPreprocessor; 
    3335}; 
    3436 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.cpp

    r2123 r2124  
    1313 
    1414ObjReader::ObjReader(Ogre::SceneManager *sceneManager): 
    15 mSceneManager(sceneManager) 
    16 {} 
     15mSceneManager(sceneManager), mPreprocessor(NULL) 
     16{ 
     17} 
    1718 
    1819 
     
    2021{ 
    2122        CLEAR_CONTAINER(mPvsObjects); 
     23         
     24        DEL_PTR(mPreprocessor); 
    2225} 
    2326 
     
    2932        GtpVisibilityPreprocessor::Debug.open("debug.log"); 
    3033        // 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 =  
    3237                GtpVisibilityPreprocessor::PreprocessorFactory::CreatePreprocessor("vss"); 
    3338 
    3439        // hack 
    35         preprocessor->mLoadMeshes = false; 
     40        mPreprocessor->mLoadMeshes = false; 
    3641 
    3742        Ogre::LogManager::getSingleton().logMessage("loading obj scene"); 
    3843 
    39         if (preprocessor->LoadScene(sceneName)) 
     44        if (mPreprocessor->LoadScene(sceneName)) 
    4045        { 
    4146                Ogre::LogManager::getSingleton().logMessage("scene loaded, loading objects"); 
    4247                // form objects from the scene triangles 
    43                 if (!preprocessor->LoadObjects(visibilitySolution, mPvsObjects, preprocessor->mObjects)) 
     48                if (!mPreprocessor->LoadObjects(visibilitySolution, mPvsObjects, mPreprocessor->mObjects)) 
    4449                { 
    4550                        Ogre::LogManager::getSingleton().logMessage("objects cannot be loaded"); 
     
    5459 
    5560        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"; 
    5763 
    5864        Ogre::LogManager::getSingleton().logMessage(d.str()); 
     
    6571                if (i % 5000 == 4999) 
    6672                { 
    67                         d << i << " objects created" << endl; 
     73                        d << i << " objects created"; 
     74                        Ogre::LogManager::getSingleton().logMessage(d.str()); 
    6875                } 
    6976         
     
    8491        } 
    8592 
    86         delete preprocessor; 
     93        //delete preprocessor; 
    8794 
    8895        return true; 
Note: See TracChangeset for help on using the changeset viewer.