Changeset 3261 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 01/09/09 19:50:56 (15 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhExporter.cpp
r3260 r3261 78 78 bool BvhExporter::Export(const string &filename, Bvh *bvh) 79 79 { 80 cout << " Info: Exportingto file '" << filename.c_str() << "'" << endl;80 cout << "Exporting bvh to file '" << filename.c_str() << "'" << endl; 81 81 82 82 FILE *fw = fopen(filename.c_str(), "wb"); … … 121 121 } 122 122 123 cout << "writing " << (int)triangles.size() << " triangle ids ..." << endl; 124 123 125 // export sorted triangle IDs 124 for (int i = 0; i < triangles.size(); ++i)126 for (int i = 0; i < (int)triangles.size(); ++i) 125 127 { 126 128 fwrite(&triangles[i], sizeof(int), 1, fw); 127 129 } 128 130 131 cout << "writing bvh nodes ..." << endl; 132 129 133 SaveNode(bvh->GetStaticRoot(), fw); 130 134 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r3260 r3261 383 383 } 384 384 385 //const bool delGeometry = true;386 const bool delGeometry = false;385 const bool delGeometry = true; 386 //const bool delGeometry = false; 387 387 return new Geometry(vertices, normals, texcoords, vertexCount, delGeometry, NULL);//tangents); 388 388 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.cpp
r3214 r3261 54 54 mImage = malloc(GetByteSize()); 55 55 56 Debug << "successfully loaded texture " << filename << " w " << mWidth << " h " << mHeight << endl; 56 Debug << "loaded texture " << filename << " w " << mWidth << " h " << mHeight << endl; 57 //cout << "loaded texture " << filename << " w " << mWidth << " h " << mHeight << endl; 57 58 58 59 ilCopyPixels(0, 0, 0, mWidth, mHeight, 1, IL_RGBA, IL_UNSIGNED_BYTE, mImage); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h
r3214 r3261 22 22 23 23 24 /** Constructor loading texture fromfile24 /** Constructor loading a texture from a file 25 25 */ 26 26 Texture(const std::string &filename); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3260 r3261 587 587 //LoadModel("sibenik.dem", dynamicObjects); 588 588 589 LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects); 590 591 AxisAlignedBox3 box; 592 box.Initialize(); 593 594 const Vector3 offs(.0f, 3000.0f, 180); 595 //const Vector3 sceneCenter(470.398f, 240.364f, 180.3); 596 Matrix4x4 moffs = TranslationMatrix(offs); 597 598 for (size_t i = 0; i < dynamicObjects.size(); ++ i) 599 { 600 dynamicObjects[i]->GetTransform()->SetMatrix(moffs); 601 box.Include(dynamicObjects[i]->GetWorldBoundingBox()); 602 } 603 604 cout << "pompeii bb:\n" << box << endl; 605 589 606 #if 0 590 LoadModel("hbuddha.dem", dynamicObjects);591 592 buddha = dynamicObjects.back();593 594 607 const Vector3 sceneCenter(470.398f, 240.364f, 181.7f); 595 608 //const Vector3 sceneCenter(470.398f, 240.364f, 180.3); 596 597 609 Matrix4x4 transl = TranslationMatrix(sceneCenter); 610 611 LoadModel("hbuddha.dem", dynamicObjects); 612 613 buddha = dynamicObjects.back(); 598 614 buddha->GetTransform()->SetMatrix(transl); 599 615 … … 646 662 647 663 648 ObjExporter().Export(model_path + "mycity.obj", bvh);649 BvhExporter().Export(model_path + "mycity.bvh", bvh);664 //ObjExporter().Export(model_path + "mycity.obj", bvh); 665 //BvhExporter().Export(model_path + "mycity.bvh", bvh); 650 666 651 667
Note: See TracChangeset
for help on using the changeset viewer.