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

environment as a singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.