Ignore:
Timestamp:
01/21/07 00:40:56 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1999 r2003  
    192192        } 
    193193 
     194        Environment::GetSingleton()->GetStringValue("Scene.filename", buff); 
     195        string filename(buff); 
     196         
     197        const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf"); 
     198        const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ? ".kdm" : ".kdt"); 
     199 
     200        if (preprocessor->InitRayCast(externKdTree, internKdTree)) 
     201        { 
     202                cout << "ray casting initialized!" << endl; 
     203        } 
     204        else 
     205        { 
     206                cout << "ray casting initialization failed!" << endl; 
     207                Cleanup(); 
     208                exit(1); 
     209        } 
     210 
     211 
    194212        ///////////// 
    195213        //-- load scene  
    196214 
    197         Environment::GetSingleton()->GetStringValue("Scene.filename", buff); 
    198         string filename(buff); 
    199          
    200  
    201215        if (!preprocessor->LoadScene(filename)) 
    202216        { 
     
    206220        } 
    207221         
    208         const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf"); 
    209         const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ? ".kdm" : ".kdt"); 
    210222 
    211223        //////////// 
    212224        //-- initialize external ray caster 
    213225 
    214         if (preprocessor->InitRayCast(externKdTree, internKdTree)) 
    215         { 
    216                 cout << "ray casting initialized!" << endl; 
     226        if (preprocessor->LoadInternKdTree(internKdTree)) 
     227        { 
     228                cout << "intern kd tree loaded!" << endl; 
    217229        } 
    218230        else 
    219231        { 
    220                 cout << "ray casting initialization failed" << endl; 
     232                cout << "loading intern kd tree failed!" << endl; 
    221233                Cleanup(); 
    222234                exit(1); 
Note: See TracChangeset for help on using the changeset viewer.