Ignore:
Timestamp:
01/22/07 23:35:03 (17 years ago)
Author:
mattausch
Message:

changed to static cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp

    r2005 r2017  
    490490{ 
    491491        BvhSubdivisionCandidate *sc =  
    492                 dynamic_cast<BvhSubdivisionCandidate *>(splitCandidate); 
     492                static_cast<BvhSubdivisionCandidate *>(splitCandidate); 
    493493        BvhTraversalData &tData = sc->mParentData; 
    494494 
     
    19941994        for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
    19951995        { 
    1996         VspViewCell *vc = dynamic_cast<VspViewCell *>(*vit); 
     1996        VspViewCell *vc = static_cast<VspViewCell *>(*vit); 
    19971997                VspLeaf *leaf = vc->mLeaves[0]; 
    19981998         
     
    20602060                if (node->IsLeaf())  
    20612061                { 
    2062                         leaf = dynamic_cast<BvhLeaf *>(node); 
     2062                        leaf = static_cast<BvhLeaf *>(node); 
    20632063 
    20642064                        if (IsObjectInLeaf(leaf, object)) 
     
    20702070                {        
    20712071                        // find point 
    2072                         BvhInterior *interior = dynamic_cast<BvhInterior *>(node); 
     2072                        BvhInterior *interior = static_cast<BvhInterior *>(node); 
    20732073         
    20742074                        if (interior->GetBack()->GetBoundingBox().Includes(object->GetBox())) 
     
    21122112        if (node->IsLeaf()) 
    21132113        { 
    2114                 BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 
     2114                BvhLeaf *leaf = static_cast<BvhLeaf *>(node); 
    21152115                const AxisAlignedBox3 box = leaf->GetBoundingBox(); 
    21162116                stream << "<Leaf" 
     
    21272127        else 
    21282128        {        
    2129                 BvhInterior *interior = dynamic_cast<BvhInterior *>(node); 
     2129                BvhInterior *interior = static_cast<BvhInterior *>(node); 
    21302130                const AxisAlignedBox3 box = interior->GetBoundingBox(); 
    21312131 
     
    22152215         
    22162216        // root and bounding box was already constructed 
    2217         BvhLeaf *bvhLeaf = dynamic_cast<BvhLeaf *>(mRoot); 
     2217        BvhLeaf *bvhLeaf = static_cast<BvhLeaf *>(mRoot); 
    22182218         
    22192219        // only rays intersecting objects in node are interesting 
     
    22262226        // create bvh traversal data 
    22272227        BvhTraversalData oData(bvhLeaf, 0, prop, nRays); 
    2228         cout << "here4" << endl; 
    2229          
     2228                 
    22302229        // create sorted object lists for the first data 
    22312230        if (mUseGlobalSorting) 
     
    22342233        } 
    22352234         
    2236         cout << "here6" << endl; 
    22372235        /////////////////// 
    22382236        //-- add first candidate for object space partition      
     
    22672265                for (cit = candidateContainer.begin(); cit != cit_end; ++ cit) 
    22682266                { 
    2269                         BvhSubdivisionCandidate *sCandidate = dynamic_cast<BvhSubdivisionCandidate *>(*cit); 
     2267                        BvhSubdivisionCandidate *sCandidate = static_cast<BvhSubdivisionCandidate *>(*cit); 
    22702268                         
    22712269                        // reevaluate priority 
     
    22952293        for (int i = 0; i < 3; ++ i) 
    22962294        { 
    2297                 cout << "here2 " << endl; 
    22982295                SortableEntryContainer *sortedObjects = new SortableEntryContainer(); 
    22992296 
     
    23162313                delete sortedObjects; 
    23172314        } 
    2318 cout << "here102" << endl; 
     2315 
    23192316        // last sorted list: by size 
    23202317        tData.mSortedObjects[3] = new ObjectContainer(); 
     
    23902387 
    23912388        const int nRays = CountRays(objects); 
    2392         BvhLeaf *bvhLeaf = dynamic_cast<BvhLeaf *>(mRoot); 
     2389        BvhLeaf *bvhLeaf = static_cast<BvhLeaf *>(mRoot); 
    23932390 
    23942391        // create bvh traversal data 
     
    25172514{ 
    25182515        BvhSubdivisionCandidate *sc =  
    2519                 dynamic_cast<BvhSubdivisionCandidate *>(splitCandidate); 
     2516                static_cast<BvhSubdivisionCandidate *>(splitCandidate); 
    25202517        BvhTraversalData &tData = sc->mParentData; 
    25212518 
     
    25312528                BvhTraversalData tBackData; 
    25322529                         
    2533                 BvhInterior *oldInterior = dynamic_cast<BvhInterior *>(oldNode); 
     2530                BvhInterior *oldInterior = static_cast<BvhInterior *>(oldNode); 
    25342531                 
    25352532                sc->mFrontObjects.clear(); 
     
    26672664 
    26682665                BvhSubdivisionCandidate *bsc =  
    2669                         dynamic_cast<BvhSubdivisionCandidate *>(candidate); 
     2666                        static_cast<BvhSubdivisionCandidate *>(candidate); 
    26702667 
    26712668                if (!InitialTerminationCriteriaMet(bsc->mParentData)) 
     
    27672764                if (node->IsLeaf()) 
    27682765                { 
    2769                         BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 
     2766                        BvhLeaf *leaf = static_cast<BvhLeaf *>(node); 
    27702767                        node->mRenderCost = EvalAbsCost(leaf->mObjects); 
    27712768                } 
    27722769                else 
    27732770                { 
    2774                         BvhInterior *interior = dynamic_cast<BvhInterior *>(node); 
     2771                        BvhInterior *interior = static_cast<BvhInterior *>(node); 
    27752772                 
    27762773                        node->mRenderCost = GetRenderCostIncrementially(interior->GetFront()) +  
Note: See TracChangeset for help on using the changeset viewer.