- Timestamp:
- 07/11/06 11:39:11 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Geom
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Geom/Demo_LodStrips/main.cpp
r1104 r1113 19 19 20 20 // Distance values 21 #define dist_min 30022 #define dist_max 70021 #define dist_min 1200 22 #define dist_max 2000 23 23 24 24 // Model name … … 215 215 color.r=0.0; 216 216 color.g=(lodfactor)*3.0f;//nlod*1.0/(diflods/3); 217 color.b=( 1.0-lodfactor)*3.0f;//(nlod*1.0/(diflods/3));217 color.b=(0.3f-lodfactor)*3.0f;//(nlod*1.0/(diflods/3)); 218 218 } 219 219 else … … 228 228 { 229 229 color.r=1.0; 230 color.g=( 1.0-lodfactor)*3.0f;//(nlod-(2*diflods/3))*1.0/(diflods/3);230 color.g=(0.3f-lodfactor)*3.0f;//(nlod-(2*diflods/3))*1.0/(diflods/3); 231 231 color.b=0.0; 232 232 } … … 387 387 388 388 theCam = mCamera; 389 theCam->setPosition(0,20,dist_m ax+50);389 theCam->setPosition(0,20,dist_min-600.0f); 390 390 // Set ambient light 391 391 mSceneMgr->setAmbientLight(ColourValue(0.3, 0.3, 0.3)); … … 464 464 465 465 if (!meshloader->GetLodStripsData()) 466 exit(1);466 OGRE_EXCEPT(1, "The loaded mesh does not contain any LOD info","LOD Demo"); 467 467 468 468 myStrips = new Geometry::LodStripsLibrary(meshloader->GetLodStripsData(),themesh); … … 476 476 ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 477 477 mat[0]->setCullingMode(CULL_ANTICLOCKWISE); 478 mat[0]->setAmbient(ColourValue ::Black);478 mat[0]->setAmbient(ColourValue(0.3f,0.3f,0.3f)); 479 479 mat[0]->setDiffuse(color); 480 480 mat[0]->setLightingEnabled(true); … … 482 482 483 483 484 for (int i= 1; i<4; i++) // 20485 for (int j= 1; j<4; j++) // 20484 for (int i=-3; i<2; i++) // 20 485 for (int j=0; j<5; j++) // 20 486 486 { 487 487 char newObjName[16]=""; … … 492 492 float randomsepx = (float)((rand()%18)-9); 493 493 float randomsepy = (float)((rand()%12)-6); 494 auxnode->translate(i*100.0f+randomsepx, 0.0f,-j*100.0f-randomsepx);494 auxnode->translate(i*100.0f+randomsepx,40.0f,-j*100.0f-randomsepx); 495 495 } 496 496 497 node->translate(0,0,-500.0f); 497 498 498 499 // show overlay -
GTP/trunk/App/Demos/Geom/Demo_LodTrees/main.cpp
r1104 r1113 307 307 308 308 if (!meshloader->GetLodStripsData() || !meshloader->GetTreeSimpSeq()) 309 exit(1); 309 OGRE_EXCEPT(1, "The loaded mesh does not contain any LOD info","LOD Demo"); 310 310 311 311 312 // show overlay
Note: See TracChangeset
for help on using the changeset viewer.