Changeset 3012 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 10/08/08 10:45:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3010 r3012 59 59 /// the renderable scene geometry 60 60 SceneEntityContainer sceneEntities; 61 SceneEntityContainer sceneEntities2; 62 61 63 // traverses and renders the hierarchy 62 64 RenderTraverser *traverser = NULL; … … 440 442 loader = new ResourceManager(); 441 443 442 //const string filename("data/city/model/city.dem");443 444 const string filename = string(model_path + "city.dem"); 444 445 445 446 if (loader->Load(filename, sceneEntities)) 446 cout << " scene" << filename << " loaded" << endl;447 cout << "model " << filename << " loaded" << endl; 447 448 else 448 449 { 449 cerr << "loading scene" << filename << " failed" << endl;450 cerr << "loading model " << filename << " failed" << endl; 450 451 CleanUp(); 451 452 exit(0); … … 463 464 } 464 465 465 #if 0466 467 int merged = 0;468 469 SceneEntity *oldEnt = NULL;470 471 cout << "merging entities .. " << endl;472 SceneEntityContainer::const_iterator sit, sit_end = sceneEntities.end();473 474 for (sit = sceneEntities.begin(); sit < sit_end; ++ sit)475 {476 SceneEntity *newEnt = (*sit);477 478 if (!newEnt->GetTransform()->IsIdentity())479 {480 sceneEntities2.push_back(newEnt);481 continue;482 }483 484 if (oldEnt)485 {486 EntityMerger merger(newEnt, oldEnt);487 SceneEntity *ent = merger.Merge();488 489 sceneEntities2.push_back(ent);490 491 oldEnt = NULL;492 493 ++ merged;494 }495 else496 {497 oldEnt = newEnt;498 }499 }500 501 if (oldEnt && oldEnt->GetTransform()->IsIdentity())502 sceneEntities2.push_back(oldEnt);503 504 cout << "merged " << merged << " of " << (int)sceneEntities.size() << " entities " << endl;505 #endif506 466 507 467 // set far plane based on scene extent … … 1171 1131 // actually render the scene geometry using the specified algorithm 1172 1132 traverser->RenderScene(); 1173 //renderQueue->Apply();1174 1133 } 1175 1134
Note: See TracChangeset
for help on using the changeset viewer.