Changeset 938 for GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Timestamp:
- 05/10/06 08:05:24 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp
r726 r938 21 21 QueryQueue queryQueue; 22 22 unsigned int visiblePixels = 0; 23 bool isAvailable = false;24 23 25 24 //Ogre::LogManager::getSingleton().logMessage("Batched Culling"); … … 131 130 } 132 131 } 133 // add rest of queries 132 133 // issue rest of queries 134 134 IssueMultipleQueries(pendingQueue, queryQueue); 135 135 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
r925 r938 24 24 QueryQueue queryQueue; 25 25 unsigned int visiblePixels = 0; 26 bool isAvailable = false;27 26 28 27 //Ogre::LogManager::getSingleton().logMessage("chc"); 29 28 //-- PART 1: process finished occlusion queries 30 29 while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty()) 31 30 { 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 33 35 while (!queryQueue.empty() && 34 36 queryQueue.front().second->GetQueryResult(visiblePixels, … … 65 67 if (!mHierarchyInterface->GetQueue()->empty()) 66 68 { 69 //Ogre::LogManager::getSingleton().logMessage("traversal"); 67 70 HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); 68 71 mHierarchyInterface->GetQueue()->pop(); … … 141 144 if (mAssumedVisibility > 0) 142 145 { 143 mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility; 146 mThreshold = RAND_MAX - RAND_MAX / mAssumedVisibility; 147 if (mAssumedVisibility > 100) // fix visibility 148 mThreshold = RAND_MAX; 144 149 } 145 150 //std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str()); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/HierarchyInterface.cpp
r925 r938 29 29 void HierarchyInterface::InitTraversal() 30 30 { 31 // initialise for front-to-back rendering31 //-- initialise for front-to-back rendering 32 32 33 33 ++ mFrameId; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp
r925 r938 11 11 // load debug stream 12 12 GtpVisibilityPreprocessor::Debug.open("debug.log"); 13 13 14 // load environment 15 mEnvironment = new GtpVisibilityPreprocessor::Environment(); 14 16 } 17 //----------------------------------------------------------------------- 15 18 VisibilityEnvironment::~VisibilityEnvironment() 16 19 { 17 // load debug stream 18 DEL_PTR(GtpVisibilityPreprocessor::environment); 19 20 DEL_PTR(mEnvironment); 20 21 } 21 22 //----------------------------------------------------------------------- 22 void VisibilityEnvironment::LoadEnvironment(string filename) 23 { 24 // todo matt: 25 GtpVisibilityPreprocessor::environment = new GtpVisibilityPreprocessor::Environment; 26 27 char argc = 2; 23 bool VisibilityEnvironment::LoadEnvironment(string filename) 24 { 25 //-- parse filename into c-style argument list 26 /*char argc = 2; 28 27 char *argv[2]; 29 28 argv[0] = ""; … … 33 32 argv[1] = fname; 34 33 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); 39 39 } 40 40 //----------------------------------------------------------------------- … … 42 42 { 43 43 char str[200]; 44 GtpVisibilityPreprocessor::environment->GetStringValue("Scene.filename", str);44 mEnvironment->GetStringValue("Scene.filename", str); 45 45 return str; 46 46 } … … 49 49 { 50 50 char str[200]; 51 GtpVisibilityPreprocessor::environment->GetStringValue("ViewCells.filename", str);51 mEnvironment->GetStringValue("ViewCells.filename", str); 52 52 return str; 53 53 } 54 54 //----------------------------------------------------------------------- 55 GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment() 56 { 57 return mEnvironment; 58 } 55 59 } // namespace GtpVisibility
Note: See TracChangeset
for help on using the changeset viewer.