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/OspTree.cpp

    r1779 r2017  
    418418                                                   const bool globalCriteriaMet) 
    419419{ 
    420         OspSubdivisionCandidate *sc = dynamic_cast<OspSubdivisionCandidate *>(splitCandidate); 
     420        OspSubdivisionCandidate *sc = static_cast<OspSubdivisionCandidate *>(splitCandidate); 
    421421        OspTraversalData &tData = sc->mParentData; 
    422422 
     
    475475                if (mStoreRays) 
    476476                { 
    477                         KdLeaf *leaf = dynamic_cast<KdLeaf *>(newNode); 
     477                        KdLeaf *leaf = static_cast<KdLeaf *>(newNode); 
    478478 
    479479                        RayInfoContainer::const_iterator it, it_end = tData.mRays->end(); 
     
    15091509        if (!node->IsLeaf()) 
    15101510        { 
    1511                 return (dynamic_cast<KdInterior *>(node))->mBox;                 
    1512         } 
    1513  
    1514         KdInterior *parent = dynamic_cast<KdInterior *>(node->mParent); 
     1511                return (static_cast<KdInterior *>(node))->mBox;          
     1512        } 
     1513 
     1514        KdInterior *parent = static_cast<KdInterior *>(node->mParent); 
    15151515 
    15161516        AxisAlignedBox3 box(parent->mBox); 
     
    15751575                for (vit = tmpViewCells.begin(); vit != vit_end; ++ vit) 
    15761576                { 
    1577                         VspViewCell *vc = dynamic_cast<VspViewCell *>(*vit); 
     1577                        VspViewCell *vc = static_cast<VspViewCell *>(*vit); 
    15781578 
    15791579                        if (!vc->Mailed()) 
     
    15901590        for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
    15911591        { 
    1592                 VspViewCell *vc = dynamic_cast<VspViewCell *>(*vit); 
     1592                VspViewCell *vc = static_cast<VspViewCell *>(*vit); 
    15931593 
    15941594                VspLeaf *leaf = vc->mLeaves[0]; 
     
    16301630                if (node->IsLeaf())  
    16311631                { 
    1632                         leaf = dynamic_cast<KdLeaf *>(node); 
     1632                        leaf = static_cast<KdLeaf *>(node); 
    16331633                }  
    16341634                else     
    16351635                {        
    16361636                        // find point 
    1637                         KdInterior *interior = dynamic_cast<KdInterior *>(node); 
     1637                        KdInterior *interior = static_cast<KdInterior *>(node); 
    16381638         
    16391639                        if (interior->mPosition > pt[interior->mAxis]) 
     
    22832283        if (node->IsLeaf()) 
    22842284        { 
    2285                 KdLeaf *leaf = dynamic_cast<KdLeaf *>(node); 
     2285                KdLeaf *leaf = static_cast<KdLeaf *>(node); 
    22862286 
    22872287                stream << "<Leaf "; 
     
    22952295        else 
    22962296        {        
    2297                 KdInterior *interior = dynamic_cast<KdInterior *>(node); 
     2297                KdInterior *interior = static_cast<KdInterior *>(node); 
    22982298         
    22992299                stream << "<Interior plane=\"" << interior->mPosition << " "  
     
    23282328                if (node->IsLeaf()) 
    23292329                { 
    2330                         KdLeaf *leaf = dynamic_cast<KdLeaf *>(node); 
     2330                        KdLeaf *leaf = static_cast<KdLeaf *>(node); 
    23312331 
    23322332                        ObjectContainer::const_iterator oit, oit_end = tData.objects->end(); 
     
    23402340                { 
    23412341                        KdObjectsTraversalData frontData, backData; 
    2342                         KdInterior *interior = dynamic_cast<KdInterior *>(node); 
     2342                        KdInterior *interior = static_cast<KdInterior *>(node); 
    23432343 
    23442344                        frontData.objects = new ObjectContainer(); 
Note: See TracChangeset for help on using the changeset viewer.