Ignore:
Timestamp:
01/11/09 02:43:59 (15 years ago)
Author:
mattausch
Message:

worked on bvh constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter2.cpp

    r3262 r3265  
    510510 
    511511 
    512         int entityCount = 1; 
     512        int entityCount = mNumShapes; 
    513513        ofile.write(reinterpret_cast<char *>(&entityCount), sizeof(int)); 
    514514 
    515515 
    516516        ////////// 
    517         //-- write single scene entity 
    518  
    519         // no transformation 
    520         bool hasTrafo = false; 
    521         ofile.write(reinterpret_cast<char *>(&hasTrafo), sizeof(bool)); 
    522  
    523         // a dummy lod 
    524         int numLODs = 1; 
    525         ofile.write(reinterpret_cast<char *>(&numLODs), sizeof(int)); 
    526  
    527         float dist = 0; 
    528         ofile.write(reinterpret_cast<char *>(&dist), sizeof(float)); 
    529  
    530         ofile.write(reinterpret_cast<char *>(&mNumShapes), sizeof(int)); 
     517        //-- write scene entities 
    531518 
    532519        // all shapes belong to this scene entity 
    533520        for (int i = 0; i < mNumShapes; ++ i) 
    534521        { 
     522                // no transformation 
     523                bool hasTrafo = false; 
     524                ofile.write(reinterpret_cast<char *>(&hasTrafo), sizeof(bool)); 
     525 
     526                // a dummy lod 
     527                int numLODs = 1; 
     528                ofile.write(reinterpret_cast<char *>(&numLODs), sizeof(int)); 
     529 
     530                float dist = 0; 
     531                ofile.write(reinterpret_cast<char *>(&dist), sizeof(float)); 
     532 
     533                int numShapes = 1; 
     534                ofile.write(reinterpret_cast<char *>(&numShapes), sizeof(int)); 
     535 
    535536                int shapeId = i; 
    536537                ofile.write(reinterpret_cast<char *>(&shapeId), sizeof(int)); 
Note: See TracChangeset for help on using the changeset viewer.