Ignore:
Timestamp:
05/10/06 08:05:24 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r925 r938  
    1111        // load debug stream 
    1212        GtpVisibilityPreprocessor::Debug.open("debug.log"); 
    13           
     13 
     14        // load environment 
     15        mEnvironment = new GtpVisibilityPreprocessor::Environment();      
    1416} 
     17//----------------------------------------------------------------------- 
    1518VisibilityEnvironment::~VisibilityEnvironment() 
    1619{ 
    17         // load debug stream 
    18         DEL_PTR(GtpVisibilityPreprocessor::environment); 
    19           
     20        DEL_PTR(mEnvironment);    
    2021} 
    2122//----------------------------------------------------------------------- 
    22 void VisibilityEnvironment::LoadEnvironment(string filename) 
    23 { 
    24         // todo matt: 
    25         GtpVisibilityPreprocessor::environment = new GtpVisibilityPreprocessor::Environment; 
    26          
    27         char argc = 2; 
     23bool VisibilityEnvironment::LoadEnvironment(string filename) 
     24{        
     25        //-- parse filename into c-style argument list 
     26        /*char argc = 2; 
    2827        char *argv[2]; 
    2928        argv[0] = ""; 
     
    3332        argv[1] = fname; 
    3433 
    35         GtpVisibilityPreprocessor::Debug << "filename: " << argv[1] << endl; 
    36  
    37         GtpVisibilityPreprocessor::environment->Parse(argc, argv, false); 
    38         //MeshKdTree::ParseEnvironment(); 
     34        GtpVisibilityPreprocessor::Debug << "here4 loading environment from: " << argv[1] << endl; 
     35*/ 
     36                //-- parse environment 
     37        return mEnvironment->ReadEnvFile(filename.c_str()); 
     38        //return GtpVisibilityPreprocessor::environment->Parse(argc, argv, false); 
    3939} 
    4040//----------------------------------------------------------------------- 
     
    4242{ 
    4343        char str[200]; 
    44         GtpVisibilityPreprocessor::environment->GetStringValue("Scene.filename", str); 
     44        mEnvironment->GetStringValue("Scene.filename", str); 
    4545        return str; 
    4646} 
     
    4949{ 
    5050        char str[200]; 
    51         GtpVisibilityPreprocessor::environment->GetStringValue("ViewCells.filename", str); 
     51        mEnvironment->GetStringValue("ViewCells.filename", str); 
    5252        return str; 
    5353} 
    54  
     54//----------------------------------------------------------------------- 
     55GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment() 
     56{ 
     57        return mEnvironment; 
     58} 
    5559} // namespace GtpVisibility 
Note: See TracChangeset for help on using the changeset viewer.