Ignore:
Timestamp:
06/12/08 01:09:23 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.cpp

    r2754 r2755  
    5757}*/ 
    5858 
    59 #if 0 
    60 void RenderTraverser::TraverseNode(HierarchyNode *node) 
    61 { 
    62         if(node->IsLeaf()) 
    63                 mNumRenderedGeometry += node->Render(); 
     59void RenderTraverser::EnqueueNode(BvhNode *node) 
     60{ 
     61        mBvh->CalcDistance(node); 
     62        mDistanceQueue.push(node); 
     63} 
     64 
     65 
     66void RenderTraverser::TraverseNode(BvhNode *node) 
     67{ 
     68        if (node->IsLeaf()) 
     69        { 
     70                //mNumRenderedGeometry += node->Render(); 
     71        } 
    6472        else  
    6573        { 
    6674                // for non leafs this renders only the bounding volume (if the flag is set) 
    6775                //node->Render(); 
    68                 mDistanceQueue.push(node->GetLeftChild()); 
    69                 mDistanceQueue.push(node->GetRightChild()); 
    70         } 
    71 } 
     76                BvhInterior *interior = static_cast<BvhInterior *>(node); 
     77 
     78                EnqueueNode(interior->GetFront()); 
     79                EnqueueNode(interior->GetBack()); 
     80        } 
     81} 
     82 
     83#if 0 
    7284 
    7385void RenderTraverser::RenderVisualization() 
Note: See TracChangeset for help on using the changeset viewer.