Changeset 2278 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 03/22/07 11:48:21 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h
r2259 r2278 16 16 17 17 /** Sets the number of nodes in this octree 18 @remark do not confuse this with the OctreeNode class which is derived from SceneNode 18 @remark do not confuse this with the OctreeNode class 19 which is derived from SceneNode. 19 20 @param num number of nodes in the octree 20 21 */ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2258 r2278 1928 1928 1929 1929 ivReader.buildTree(this, node); 1930 1931 1930 ivReader.collapse(); 1932 1931 1933 1932 std::stringstream d; 1934 1933 d << "loaded " << filename << " in " << timer->getMilliseconds() * 1e-3 << " secs"; … … 1937 1936 PlatformManager::getSingleton().destroyTimer(timer); 1938 1937 1939 //-- bake into static geometry1940 1938 /*if (USE_STATIC_GEOMETRY) 1941 1939 { 1940 //-- bake into static geometry 1942 1941 BakeSceneIntoStaticGeometry("staticVienna", "Vienna"); 1943 1942 }*/ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
r2259 r2278 58 58 Octree *octree = static_cast<Octree *>(root); 59 59 60 int mask = (int) (rand() * 8 );60 int mask = (int) (rand() * 8.0f); 61 61 62 62 // random decision 63 Octree *child = octree->mChildren[mask & 1][mask & 2][mask & 3]; 63 Octree *child = NULL; 64 65 while (!child) 66 child = octree->mChildren[(mask & 4) / 4][(mask & 2) / 2][mask & 1]; 64 67 65 68 return GetRandomLeaf(child); … … 173 176 { 174 177 octant->setOctreeFullyVisible(octant->isOctreeVisible()); 178 175 179 return; 176 180 } 177 181 178 octant->setOctreeFullyVisible( false);179 182 octant->setOctreeFullyVisible(true); 183 180 184 Octree *nextChild; 181 185 //LogManager::getSingleton().logMessage("***"); 182 186 for (int i = 0; i < 8; ++ i) 183 187 { 184 int x = i &4;185 int y = i &2;188 int x = (i & 4) / 4; 189 int y = (i & 2) / 2; 186 190 int z = i & 1; 191 192 //std::stringstream d; d << "x " << x << " y " << y << " z " << z; 193 //LogManager::getSingleton().logMessage(d.str()); 187 194 188 195 if ((nextChild = octant->mChildren[x][y][z]) != NULL) 189 196 { 190 197 DetermineFullVisibility(nextChild); 198 // this leaf is not fully visible => break 191 199 if (!nextChild->isOctreeFullyVisible()) 192 return;200 octant->setOctreeFullyVisible(false); 193 201 } 194 202 } 195 196 // all children fully visible => pull up197 octant->setOctreeFullyVisible(true);198 203 } 199 204 //----------------------------------------------------------------------- … … 295 300 } 296 301 297 //static_cast<OctreeSceneManager *>(mSceneManager)->getBoxes()->push_back(box);298 302 static_cast<OctreeSceneManager *>(mSceneManager)->getBoxes()->push_back(box); 299 303 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp
r2254 r2278 95 95 static RenderOperation ro; 96 96 97 //LogManager::getSingleton().logMessage("here66");98 97 SolidBoundingBox *solidBox = GetSolidBoundingBox(); 99 98 … … 182 181 GtpVisibility::HierarchyNode *node, 183 182 const bool wasVisible) 184 { //LogManager::getSingleton().logMessage("here6960");183 { 185 184 // get next available test id 186 185 GtpVisibility::OcclusionQuery *query = GetNextOcclusionQuery(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp
r1264 r2278 157 157 return false; 158 158 159 //mSceneNodes.clear(); // reset list of objects 160 161 while (!ifstr.eof()) 159 while (1) 162 160 { 163 161 ifstr.getline(line, 256); 162 163 if (ifstr.eof()) 164 break; 165 164 166 sscanf(line, "%s %f %f %f %f %f %f %f %f %f %f", objName, 165 167 &position.x, &position.y, &position.z, -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreTerrainContentGenerator.cpp
r164 r2278 43 43 return false; 44 44 } 45 45 46 46 47 /*******************************************************/ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2255 r2278 26 26 RuntimeLibrary="3" 27 27 EnableFunctionLevelLinking="TRUE" 28 RuntimeTypeInfo=" TRUE"28 RuntimeTypeInfo="FALSE" 29 29 UsePrecompiledHeader="2" 30 30 WarningLevel="3" … … 113 113 AdditionalLibraryDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)";"..\..\..\Preprocessing\lib\$(ConfigurationName)";..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;"..\..\lib\$(ConfigurationName)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\$(ConfigurationName)"" 114 114 ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 115 GenerateDebugInformation=" FALSE"115 GenerateDebugInformation="TRUE" 116 116 SubSystem="2" 117 117 OptimizeReferences="2"
Note: See TracChangeset
for help on using the changeset viewer.