Ignore:
Timestamp:
01/11/09 22:54:05 (15 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhConstructor.cpp

    r3267 r3268  
    130130                // no split could be achieved => just halve number of objects 
    131131                split = (leaf->mLast + leaf->mFirst) / 2; 
    132                 cerr << "no reduction " << leaf->CountPrimitives() << " " << leaf->mFirst << " " << leaf->mLast << endl; 
     132                //cerr << "no reduction " << leaf->CountPrimitives() << " " << leaf->mFirst << " " << leaf->mLast << endl; 
    133133        } 
    134134 
     
    185185        BvhLeaf *l = new BvhLeaf(NULL); 
    186186         
    187         l->mBox = SceneEntity::ComputeBoundingBox(mEntities + mFirst, mFirst - mLast + 1); 
    188  
    189187        l->mFirst = mFirst; 
    190188        l->mLast = mLast; 
     189 
     190        cout << "constructing bvh from "  << l->mFirst << " to " << l->mLast << endl; 
     191 
     192        l->mBox = SceneEntity::ComputeBoundingBox(mEntities + mFirst, mLast - mFirst + 1); 
    191193        l->mArea = l->mBox.SurfaceArea(); 
    192194         
    193         cout << "constructing bvh from "  << l->mFirst << " to " << l->mLast << endl; 
    194  
    195195        root = SubdivideLeaf(l, 0); 
    196196 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp

    r3262 r3268  
    187187        AxisAlignedBox3 box; 
    188188         
    189         if (!numEntities) 
     189        if (numEntities <= 0) 
    190190        {       // no box => just initialize 
    191191                box.Initialize(); 
     
    209209        AxisAlignedBox3 box; 
    210210         
    211         if (!entities.empty()) 
     211        if (entities.empty()) 
    212212        {       // no box => just initialize 
    213213                box.Initialize(); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp

    r3250 r3268  
    109109 
    110110        // scale the sky dome so no intersection with the scene is visible 
    111         //const float scaleFactor = 80.0f; 
    112         const float scaleFactor = 500.0f; 
     111        const float scaleFactor = 80.0f; 
     112        //const float scaleFactor = 500.0f; 
    113113 
    114114        position.z -= 3.0f * scaleFactor; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3267 r3268  
    587587        //LoadModel("sibenik.dem", dynamicObjects); 
    588588 
    589         LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects); 
    590  
     589        //LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects); 
     590/* 
    591591        AxisAlignedBox3 box; 
    592592        box.Initialize(); 
     
    603603 
    604604        cout << "pompeii bb:\n" << box << endl; 
    605  
     605*/ 
    606606#if 0 
    607607        const Vector3 sceneCenter(470.398f, 240.364f, 181.7f); 
     
    645645 
    646646        BvhFactory bvhFactory; 
    647         //bvh = bvhFactory.Create(bvh_filename, staticObjects, dynamicObjects, maxDepthForTestingChildren); 
     647#if 1 
    648648        bvh = bvhFactory.Create(staticObjects, dynamicObjects, maxDepthForTestingChildren); 
     649#else 
     650        bvh = bvhFactory.Create(bvh_filename, staticObjects, dynamicObjects, maxDepthForTestingChildren); 
     651#endif 
    649652 
    650653        if (!bvh) 
Note: See TracChangeset for help on using the changeset viewer.