Ignore:
Timestamp:
06/07/06 18:38:29 (18 years ago)
Author:
mattausch
Message:

environment as a singleton

Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r975 r1004  
    10291029        OgreBoundingBoxConverter bconverter(this); 
    10301030 
    1031          
    1032         GtpVisibilityPreprocessor::Environment *env =  
    1033                 mVisibilityManager->GetVisibilityEnvironment()->GetPreprocessorEnvironment(); 
    1034  
    10351031        // load the view cells assigning the found objects to the pvss 
    10361032        mViewCellsManager =  
    1037                 GtpVisibilityPreprocessor::ViewCellsManager::LoadViewCells(filename, &mObjects, env, false, &bconverter); 
     1033                GtpVisibilityPreprocessor::ViewCellsManager::LoadViewCells(filename, &mObjects, false, &bconverter); 
    10381034 
    10391035        return (mViewCellsManager != NULL); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityEnvironment.h

    r938 r1004  
    4040 
    4141protected: 
    42         GtpVisibilityPreprocessor::Environment *mEnvironment; 
     42        //GtpVisibilityPreprocessor::Environment *Environment::GetSingleton(); 
    4343}; 
    4444} // namespace GtpVisibility 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp

    r971 r1004  
    1212        GtpVisibilityPreprocessor::Debug.open("debug.log"); 
    1313        // load environment 
    14         mEnvironment = new GtpVisibilityPreprocessor::Environment();      
     14        //Environment::GetSingleton() = new GtpVisibilityPreprocessor::Environment::GetSingleton();       
    1515} 
    1616//----------------------------------------------------------------------- 
    1717VisibilityEnvironment::~VisibilityEnvironment() 
    1818{ 
    19         DEL_PTR(mEnvironment);    
     19        //DEL_PTR(Environment::GetSingleton()); 
     20        GtpVisibilityPreprocessor::Environment::DelSingleton(); 
    2021} 
    2122//----------------------------------------------------------------------- 
     
    2324{                
    2425        //-- parse environment 
    25         return mEnvironment->ReadEnvFile(filename.c_str()); 
     26        return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str()); 
    2627} 
    2728//----------------------------------------------------------------------- 
     
    2930{ 
    3031        char str[200]; 
    31         mEnvironment->GetStringValue("Scene.filename", str); 
     32        GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("Scene.filename", str); 
    3233        return str; 
    3334} 
     
    3637{ 
    3738        char str[200]; 
    38         mEnvironment->GetStringValue("ViewCells.filename", str); 
     39        GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("ViewCells.filename", str); 
     40         
    3941        return str; 
    4042} 
     
    4244GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment() 
    4345{ 
    44         return mEnvironment; 
     46        return GtpVisibilityPreprocessor::Environment::GetSingleton(); 
    4547} 
    4648} // namespace GtpVisibility 
Note: See TracChangeset for help on using the changeset viewer.