Ignore:
Timestamp:
01/09/09 19:50:56 (15 years ago)
Author:
mattausch
Message:

worked on powerplant loading

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  
    7878bool BvhExporter::Export(const string &filename, Bvh *bvh) 
    7979{ 
    80          cout << "Info: Exporting to file '" << filename.c_str() << "'" << endl; 
     80         cout << "Exporting bvh to file '" << filename.c_str() << "'" << endl; 
    8181   
    8282         FILE *fw = fopen(filename.c_str(), "wb"); 
     
    121121         } 
    122122 
     123         cout << "writing " << (int)triangles.size() << " triangle ids ..." << endl; 
     124 
    123125         // export sorted triangle IDs 
    124          for (int i = 0; i < triangles.size(); ++i)  
     126         for (int i = 0; i < (int)triangles.size(); ++i)  
    125127         { 
    126128                 fwrite(&triangles[i], sizeof(int), 1, fw); 
    127129         } 
    128130 
     131         cout << "writing bvh nodes ..." << endl; 
     132          
    129133         SaveNode(bvh->GetStaticRoot(), fw); 
    130134          
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp

    r3260 r3261  
    383383        } 
    384384 
    385         //const bool delGeometry = true; 
    386         const bool delGeometry = false; 
     385        const bool delGeometry = true; 
     386        //const bool delGeometry = false; 
    387387        return new Geometry(vertices, normals, texcoords, vertexCount, delGeometry, NULL);//tangents); 
    388388} 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.cpp

    r3214 r3261  
    5454                mImage = malloc(GetByteSize()); 
    5555 
    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; 
    5758 
    5859                ilCopyPixels(0, 0, 0, mWidth, mHeight, 1, IL_RGBA, IL_UNSIGNED_BYTE, mImage); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h

    r3214 r3261  
    2222 
    2323 
    24         /** Constructor loading texture from file 
     24        /** Constructor loading a texture from a file 
    2525        */ 
    2626        Texture(const std::string &filename); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3260 r3261  
    587587        //LoadModel("sibenik.dem", dynamicObjects); 
    588588 
     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 
    589606#if 0 
    590         LoadModel("hbuddha.dem", dynamicObjects); 
    591  
    592         buddha = dynamicObjects.back(); 
    593          
    594607        const Vector3 sceneCenter(470.398f, 240.364f, 181.7f); 
    595608        //const Vector3 sceneCenter(470.398f, 240.364f, 180.3); 
    596          
    597609        Matrix4x4 transl = TranslationMatrix(sceneCenter); 
     610         
     611        LoadModel("hbuddha.dem", dynamicObjects); 
     612 
     613        buddha = dynamicObjects.back(); 
    598614        buddha->GetTransform()->SetMatrix(transl); 
    599615 
     
    646662 
    647663 
    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); 
    650666 
    651667 
Note: See TracChangeset for help on using the changeset viewer.