Ignore:
Timestamp:
05/10/06 08:05:24 (19 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC/src
Files:
4 edited

Legend:

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

    r726 r938  
    2121        QueryQueue queryQueue; 
    2222        unsigned int visiblePixels = 0; 
    23         bool isAvailable = false; 
    2423 
    2524        //Ogre::LogManager::getSingleton().logMessage("Batched Culling"); 
     
    131130                        } 
    132131                } 
    133                 // add rest of queries 
     132 
     133                // issue rest of queries 
    134134                IssueMultipleQueries(pendingQueue, queryQueue); 
    135135        } 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp

    r925 r938  
    2424        QueryQueue queryQueue; 
    2525        unsigned int visiblePixels = 0; 
    26         bool isAvailable = false; 
    2726         
    28  
     27        //Ogre::LogManager::getSingleton().logMessage("chc"); 
    2928        //-- PART 1: process finished occlusion queries 
    3029        while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 
    3130        { 
    32                 // only wait for result if queue is empty 
     31                //if (mHierarchyInterface->GetQueue()->empty()) 
     32                //      Ogre::LogManager::getSingleton().logMessage("distance queue empty!!"); 
     33 
     34                // only wait for result if there are no nodes to process 
    3335                while (!queryQueue.empty() &&  
    3436                           queryQueue.front().second->GetQueryResult(visiblePixels,  
     
    6567                if (!mHierarchyInterface->GetQueue()->empty()) 
    6668                { 
     69                        //Ogre::LogManager::getSingleton().logMessage("traversal"); 
    6770                        HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); 
    6871                        mHierarchyInterface->GetQueue()->pop(); 
     
    141144        if (mAssumedVisibility > 0) 
    142145        { 
    143                 mThreshold =  RAND_MAX - RAND_MAX / mAssumedVisibility; 
     146                mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility; 
     147                if (mAssumedVisibility > 100) // fix visibility 
     148                        mThreshold = RAND_MAX; 
    144149        } 
    145150        //std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str()); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/HierarchyInterface.cpp

    r925 r938  
    2929void HierarchyInterface::InitTraversal() 
    3030{ 
    31         // initialise for front-to-back rendering 
     31        //-- initialise for front-to-back rendering 
    3232 
    3333        ++ mFrameId; 
  • 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.