Changeset 3256 for GTP/trunk/App/Demos/Vis
- Timestamp:
- 01/07/09 14:22:34 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
r3253 r3256 23 23 #visibilitySolution=vienna_full-8x3-refu 24 24 visibilitySolution=vienna_full-8x3-pgv 25 26 useSkylightForIllum= !25 viewCellsScaleFactor=1.0f 26 useSkylightForIllum=1 27 27 28 28 … … 61 61 ## powerplant options 62 62 63 #filename=PowerPlantM63 filename=PowerPlantM 64 64 65 #keyForwardMotion=500.0f66 #mouseMotion=3.0f;67 #visibilitySolution=power-plant-2c-xx-1000b-pgv268 #camPosition=-1320.57 -6306.34 360369 #camDirection=0.292156 0.9556 0.038387870 65 keyForwardMotion=500.0f 66 mouseMotion=3.0f; 67 visibilitySolution=power-plant-2c-xx-1000b-pgv2 68 camPosition=-1320.57 -6306.34 3603 69 camDirection=0.292156 0.9556 0.0383878 70 viewCellsScaleFactor=0.05f 71 71 72 72 ##################### -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ViewCellsTree.cpp
r3251 r3256 13 13 14 14 #define VIEWCELLS_VERSION 1.0f 15 16 // hack: this has to be set to 0.05f for powerplant, to 1 otherwise17 //static const float sScale = 0.05f;18 static const float sScale = 1.0f;19 15 20 16 … … 85 81 fread(&box, sizeof(AxisAlignedBox3), 1, fr); 86 82 87 box.Scale( sScale);83 box.Scale(mScaleFactor); 88 84 89 85 Vector3 v1(box.Min().x, -box.Min().z, box.Min().y); … … 128 124 fread(&mypos, sizeof(float), 1, fr); 129 125 130 mypos *= sScale;126 mypos *= mScaleFactor; 131 127 132 128 // changed coordinate system must be considered also here … … 154 150 155 151 152 void ViewCellsTree::SetScaleFactor(float scale) 153 { 154 mScaleFactor = scale; 156 155 } 156 157 158 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ViewCellsTree.h
r3244 r3256 85 85 86 86 bool LoadFromFile(const std::string &filename); 87 /** Hack: Sometimes the scene has to be scaled, then also 88 the view cells must be scaled accordingly. 89 */ 90 void SetScaleFactor(float scale); 87 91 88 92 … … 97 101 AxisAlignedBox3 mBox; 98 102 ViewCellsTreeNode *mRoot; 103 float mScaleFactor; 99 104 }; 100 105 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3252 r3256 265 265 266 266 int sCurrentMrtSet = 0; 267 268 267 static Matrix4x4 invTrafo = IdentityMatrix(); 269 270 268 float mouseMotion = 0.2f; 269 270 float viewCellsScaleFactor = 1.0f; 271 271 272 272 … … 457 457 458 458 env.GetBoolParam(string("usePvs"), usePvs); 459 460 459 env.GetBoolParam(string("useSkylightForIllum"), useSkylightForIllum); 460 env.GetFloatParam(string("viewCellsScaleFactor"), viewCellsScaleFactor); 461 461 462 462 //env.GetStringParam(string("modelPath"), model_path); … … 492 492 cout << "use PVSs: " << usePvs << endl; 493 493 cout << "visibility solution: " << visibilitySolution << endl; 494 cout << "view cells scale factor: " << viewCellsScaleFactor << endl; 494 495 cout << "use skylight for illumination: " << useSkylightForIllum << endl; 495 496 … … 523 524 524 525 SceneEntity::SetUseLODs(useLODs); 526 525 527 526 528 if (!useFullScreen) … … 1192 1194 if (1 && usePvs) 1193 1195 { 1194 if (!viewCellsTree) LoadVisibilitySolution(); 1195 LoadPvs(); 1196 if (!viewCellsTree) LoadVisibilitySolution(); 1197 1198 if (viewCellsTree) 1199 { 1200 viewCellsTree->SetScaleFactor(viewCellsScaleFactor); 1201 LoadPvs(); 1202 } 1196 1203 } 1197 1204
Note: See TracChangeset
for help on using the changeset viewer.