Changeset 1302


Ignore:
Timestamp:
08/30/06 21:54:49 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
10 edited

Legend:

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

    r1298 r1302  
    2929int BvhNode::sReservedMailboxes = 1; 
    3030 
    31  
    3231BvHierarchy *BvHierarchy::BvhSubdivisionCandidate::sBvHierarchy = NULL; 
    33  
    3432 
    3533 
     
    8583 
    8684BvhLeaf::BvhLeaf(const AxisAlignedBox3 &bbox): 
    87 BvhNode(bbox) 
     85BvhNode(bbox), mSubdivisionCandidate(NULL) 
    8886{ 
    8987} 
     
    430428 
    431429        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
    432         const float oldRenderCost =  
    433                 splitCandidate.mParentData.mProbability * (float)leaf->mObjects.size() / viewSpaceVol; 
     430        const float oldProp = EvalViewCellsVolume(leaf->mObjects); 
     431        const float oldProp2 = splitCandidate.mParentData.mProbability; //Debug << "here8 " << (oldProp - oldProp2) / viewSpaceVol << "  " << oldProp  / viewSpaceVol << " " << oldProp2  / viewSpaceVol << endl; 
     432 
     433        const float oldRenderCost = oldProp * (float)leaf->mObjects.size() / viewSpaceVol; 
    434434 
    435435        // compute global decrease in render cost 
    436436        float newRenderCost = EvalRenderCost(splitCandidate.mParentData, 
    437                                                                              splitCandidate.mFrontObjects,  
     437                                                                             splitCandidate.mFrontObjects, 
    438438                                                                                 splitCandidate.mBackObjects); 
    439439 
     
    445445        splitCandidate.SetRenderCostDecrease(renderCostDecr); 
    446446 
    447 #if 0 
     447#if 1 
    448448        const float priority = (float)-splitCandidate.mParentData.mDepth; 
    449449#else    
     
    452452        const float factor = mRenderCostDecreaseWeight; 
    453453        const float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 
    454  
    455454#endif 
    456455 
     
    476475        return (0 
    477476                || (mBvhStats.Leaves() >= mTermMaxLeaves) 
    478                 || (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
     477                //|| (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
    479478                //|| mOutOfMemory  
    480479                ); 
     
    574573        } 
    575574 
    576         const float oldRenderCost = tData.mProbability * (float)tData.mNode->mObjects.size(); 
    577         const float newRenderCost =  
    578                 EvalRenderCost(tData, objectsFront, objectsBack); 
     575        const float oldProp = EvalViewCellsVolume(tData.mNode->mObjects); 
     576        //const float oldProp2 = tData.mProbability; Debug << "here65 " << oldProp - oldProp2 << endl; 
     577 
     578        const float oldRenderCost = oldProp * (float)tData.mNode->mObjects.size(); 
     579        const float newRenderCost = EvalRenderCost(tData, objectsFront, objectsBack); 
    579580 
    580581        const float ratio = newRenderCost / oldRenderCost; 
     
    960961 
    961962        //-- pvs rendering heuristics 
    962         const float newRenderCost = nObjectsFront * pFront +  
    963                                                                 nObjectsBack * pBack; 
    964  
     963        const float newRenderCost = nObjectsFront * pFront + nObjectsBack * pBack; 
     964        /* 
    965965        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
    966         /*Debug << "\nbvh render cost\n"  
     966        Debug << "\nbvh render cost\n"  
    967967                  << "back p: " << pBack / viewSpaceVol << " front p " << pFront / viewSpaceVol << endl 
    968968                  << "new rc: " << newRenderCost / viewSpaceVol << endl;*/ 
    969                   
    970969 
    971970        return newRenderCost; 
     
    11001099 
    11011100        Debug << "collecting " << (int)viewCells.size() << " dirty candidates" << endl; 
     1101 
    11021102        for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
    11031103        { 
     
    11051105                VspLeaf *leaf = vc->mLeaf; 
    11061106                SubdivisionCandidate *candidate = leaf->GetSubdivisionCandidate(); 
     1107                Debug << "here100 candidate: " << candidate << " type: " << candidate->Type() << endl; 
    11071108                 
    11081109                dirtyList.push_back(leaf->GetSubdivisionCandidate()); 
     
    13011302 
    13021303        // compute bounding box from objects 
    1303         // we assume that root was already created 
     1304        // note: we assume that root was already created 
    13041305        mBoundingBox = mRoot->GetBoundingBox(); 
    13051306        BvhLeaf *bvhleaf = dynamic_cast<BvhLeaf *>(mRoot); 
     
    13111312        AssociateObjectsWithRays(sampleRays); 
    13121313         
    1313  
    13141314        // probabilty is voume of all "seen" view cells 
    13151315#if 1 
     
    13261326                new BvhSubdivisionCandidate(oData); 
    13271327 
    1328         //UpdateViewCellsPvs(kdleaf, rays); 
    1329  
    13301328        EvalSubdivisionCandidate(*oSubdivisionCandidate); 
     1329        bvhleaf->SetSubdivisionCandidate(oSubdivisionCandidate); 
    13311330 
    13321331        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r1297 r1302  
    3535class VspTree; 
    3636class ViewCellsContainer; 
    37 class BvhSubdivisionCandidate; 
     37//class BvhSubdivisionCandidate; 
    3838 
    3939 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1298 r1302  
    232232                || (mHierarchyStats.Leaves() >= mTermMaxLeaves)  
    233233                //|| (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
    234                 //||    candidate->GlobalTerminationCriteriaMet() 
     234                ||      candidate->GlobalTerminationCriteriaMet() 
    235235                ); 
    236236} 
     
    269269                                                *objectSpaceRays); 
    270270 
    271  
    272271        cout << "Constructing view space / object space tree ... \n"; 
    273272        const long startTime = GetTime();        
    274273         
    275274        const bool repairQueue = true; 
     275        //const bool repairQueue = false; 
     276 
    276277        // process object space candidates 
    277278        RunConstruction(repairQueue); 
    278  
    279         cout << "finished in " << TimeDiff(startTime, GetTime())*1e-3 << " secs" << endl; 
     279        cout << "finished in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    280280 
    281281        mVspTree->mVspStats.Stop(); 
     
    424424                        if (repair) RepairQueue(); 
    425425 
    426                         cout << "candidate: " << mCurrentCandidate->Type() << ", priority: "  
    427                                  << mCurrentCandidate->GetPriority() << endl; 
    428                 } 
    429  
     426                        Debug << "candidate: " << mCurrentCandidate->Type() << ", priority: "  
     427                                  << mCurrentCandidate->GetPriority() << endl; 
     428                } 
     429                 
    430430                DEL_PTR(mCurrentCandidate); 
    431431        } 
     
    457457 
    458458                        mBvHierarchy->CollectDirtyCandidates(sc, dirtyList); 
     459 
     460sc->mParentData.mNode->SetSubdivisionCandidate(NULL); // HACK 
    459461                        break; 
    460462                } 
     
    471473 
    472474        mVspTree->CollectDirtyCandidates(sc, dirtyList); 
     475 
     476sc->mParentData.mNode->SetSubdivisionCandidate(NULL); // HACK 
    473477} 
    474478 
    475479 
    476480void HierarchyManager::CollectDirtyCandidates(SubdivisionCandidateContainer &dirtyList) 
    477 {        
     481{ 
    478482        // we have either a object space or view space split 
    479483        if (mCurrentCandidate->Type() == SubdivisionCandidate::VIEW_SPACE) 
    480484        { 
     485                Debug << "collecting candidates after view space split" << endl; 
    481486                CollectViewSpaceDirtyList(dirtyList); 
    482487        } 
    483488        else // object space split 
    484         {        
     489        {       Debug << "collecting candidates after object space split" << endl; 
    485490                CollectObjectSpaceDirtyList(dirtyList); 
    486491        } 
     
    509514        // collect list of "dirty" candidates 
    510515        vector<SubdivisionCandidate *> dirtyList; 
     516        Debug << "collecting dirty candidates" << endl; 
    511517        CollectDirtyCandidates(dirtyList); 
    512518         
    513519        //-- reevaluate the dirty list 
    514520        vector<SubdivisionCandidate *>::const_iterator sit, sit_end = dirtyList.end(); 
     521         
     522        Debug << "collected " << (int)dirtyList.size() << " candidates" << endl; 
    515523 
    516524        for (sit = dirtyList.begin(); sit != sit_end; ++ sit) 
    517525        { 
    518526                SubdivisionCandidate* sc = *sit; 
    519                 // erase from queue 
    520                 mTQueue.Erase(sc); 
    521                 // reevaluate 
    522                 sc->EvalPriority(); 
    523                 // reinsert 
    524                 mTQueue.Push(sc); 
     527                float rcd = sc->GetRenderCostDecrease(); 
     528                Debug << "here6 " << rcd << endl; 
     529                Debug << "here84 " << endl; 
     530                Debug << "here7 " << sc << endl; 
     531                Debug << "here90 " << sc->GetPosition() << endl; 
     532                Debug << "here91 " << sc->Type() << endl; 
     533                //Debug << "here1191" << sc->Type() << endl; 
     534                //Debug << "sc: " << sc << " " << sc->GetPosition() << " " << sc->Type() << endl; 
     535                 
     536                Debug << "here11" << endl; 
     537                mTQueue.Erase(sc); // erase from queue 
     538                Debug << "here2" << endl; 
     539 
     540                sc->EvalPriority(); // reevaluate 
     541                 
     542        /*      cout << "render cost decrease diff " << rcd - sc->GetRenderCostDecrease()  
     543                         << " old: " << rcd << " new " << sc->GetRenderCostDecrease() 
     544                         << " type " << sc->Type() << endl;*/ 
     545 
     546                mTQueue.Push(sc); // reinsert 
    525547        } 
    526548} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp

    r1299 r1302  
    521521                // use a small box outside of the scene 
    522522                box.Scale(Vector3(0.1f,0.5f,0.5f)); 
    523                 box.Translate(Vector3(Magnitude(mKdTree->GetBox().Size())*0.5, 0, 0)); 
     523                box.Translate(Vector3(Magnitude(mKdTree->GetBox().Size())*0.5f, 0, 0)); 
    524524          } else { 
    525525                float s = box.Size(0); 
     
    692692          GenerateRays(mRssSamplesPerPass*ratios[0], RSS_BASED_DISTRIBUTION, rays); 
    693693 
    694           rays.NormalizePdf((int)rays.size()); 
     694          rays.NormalizePdf((float)rays.size()); 
    695695           
    696696          CastRays(rays, tmpVssRays); 
     
    702702#endif 
    703703          times[0] = TimeDiff(t1, GetTime()); 
    704           nrays[0] = rays.size(); 
     704          nrays[0] = (int)rays.size(); 
    705705           
    706706          mStats<<"#RssRelContrib"<<endl<<contributions[0]/nrays[0]<<endl; 
     
    713713                GenerateRays(mRssSamplesPerPass*ratios[1], SPATIAL_BOX_BASED_DISTRIBUTION, rays); 
    714714                CastRays(rays, tmpVssRays); 
    715                 castRays += rays.size(); 
     715                castRays += (int)rays.size(); 
    716716#if ADD_RAYS_IN_PLACE  
    717717                contributions[1] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, true, false); 
     
    720720#endif 
    721721          times[1] = TimeDiff(t1, GetTime()); 
    722           nrays[1] = rays.size(); 
     722          nrays[1] = (int)rays.size(); 
    723723 
    724724          mStats<<"#SpatialRelContrib"<<endl<<contributions[1]/nrays[1]<<endl; 
     
    735735                GenerateRays(mRssSamplesPerPass*ratios[2], DIRECTION_BASED_DISTRIBUTION, rays); 
    736736                CastRays(rays, tmpVssRays); 
    737                 castRays += rays.size(); 
     737                castRays += (int)rays.size(); 
    738738#if ADD_RAYS_IN_PLACE  
    739739                contributions[2] = mViewCellsManager->ComputeSampleContributions(tmpVssRays, true, false); 
     
    742742#endif 
    743743                times[2] = TimeDiff(t1, GetTime()); 
    744                 nrays[2] = rays.size(); 
     744                nrays[2] = (int)rays.size(); 
    745745                 
    746746                mStats<<"#DirectionalRelContrib"<<endl<<contributions[2]/nrays[2]<<endl; 
     
    790790          CastRays(rays, vssRays); 
    791791          cout<<"done."<<endl; 
    792           castRays += rays.size(); 
     792          castRays += (int)rays.size(); 
    793793          if (mUseViewcells) { 
    794794                /// compute view cell contribution of rays 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SubdivisionCandidate.h

    r1297 r1302  
    2525 
    2626        SubdivisionCandidate(): mRenderCostDecrease(0) {}; 
    27  
    28         /*SubdivisionCandidate(const AxisAlignedPlane &plane):  
    29         mSplitPlane(plane), mRenderCostDecrease(0) 
    30         {}*/ 
    3127 
    3228        virtual void EvalPriority() = 0; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1293 r1302  
    57035703        } 
    57045704 
    5705         Debug << "\nhere295 " << rc / mHierarchyManager->GetVspTree()->GetBoundingBox().GetVolume() << endl; 
     5705        Debug << "\nrendercost hack: " << rc / mHierarchyManager->GetVspTree()->GetBoundingBox().GetVolume() << endl; 
    57065706        mViewCellsTree->ExportStats(fileName); 
    57075707        cout << "finished" << endl; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r1291 r1302  
    529529                                                          geom); 
    530530 
     531        // evaluate the priority of this traversal data 
    531532        EvalPriority(tData); 
    532  
    533533 
    534534        // first node is kd node, i.e. an axis aligned box 
     
    750750{ 
    751751        return 
    752                 (mOutOfMemory  
     752                (0 
     753                || mOutOfMemory  
    753754                || (mBspStats.Leaves() >= mMaxViewCells)  
    754755                || (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
     
    23162317 
    23172318#ifdef _DEBUG 
    2318         Debug << axis << " " << pvsSize << " " << pvsBack << " " << pvsFront << endl; 
    2319         Debug << pFront << " " << pBack << " " << pOverall << endl; 
     2319        Debug << "axis: " << axis << " " << pvsSize << " " << pvsBack << " " << pvsFront << endl; 
     2320        Debug << "p: " << pFront << " " << pBack << " " << pOverall << endl; 
    23202321#endif 
    23212322 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1297 r1302  
    2323 
    2424 
     25 
    2526namespace GtpVisibilityPreprocessor { 
    2627 
     
    3233 
    3334VspTree *VspTree::VspSubdivisionCandidate::sVspTree = NULL; 
    34  
     35int VspNode::sMailId = 1; 
    3536 
    3637// variable for debugging volume contribution for heuristics 
    3738static float debugVol; 
    3839 
    39 int VspNode::sMailId = 1; 
    4040 
    4141// pvs penalty can be different from pvs size 
     
    5353                return (float)upper; 
    5454        } 
    55  
    5655        return (float)pvs; 
    5756} 
     
    299298 
    300299 
    301 VspLeaf::VspLeaf(): mViewCell(NULL), mPvs(NULL) 
     300VspLeaf::VspLeaf(): mViewCell(NULL), mPvs(NULL), mSubdivisionCandidate(NULL) 
    302301{ 
    303302} 
     
    554553                // || mOutOfMemory 
    555554                || (mVspStats.Leaves() >= mMaxViewCells) 
    556         || (mGlobalCostMisses >= mTermGlobalCostMissTolerance)  
     555        //|| (mGlobalCostMisses >= mTermGlobalCostMissTolerance)  
    557556                ); 
    558557 
     
    630629        VspSubdivisionCandidate *sc =  
    631630                dynamic_cast<VspSubdivisionCandidate *>(splitCandidate); 
     631 
    632632        VspTraversalData &tData = sc->mParentData; 
    633  
    634633        VspNode *newNode = tData.mNode; 
    635634 
     
    735734 
    736735        // max cost threshold violated? 
    737         splitCandidate.mMaxCostMisses =  
    738                 maxCostRatioViolated  ?  
     736        splitCandidate.mMaxCostMisses = maxCostRatioViolated  ?  
    739737                        splitCandidate.mParentData.mMaxCostMisses + 1: 
    740738                        splitCandidate.mParentData.mMaxCostMisses; 
     
    749747        splitCandidate.SetRenderCostDecrease(renderCostDecr); 
    750748 
    751 #if 0 
     749#if 1 
    752750        const float priority = (float)-splitCandidate.mParentData.mDepth; 
    753 #else    
    754  
     751#else 
    755752        // take render cost of node into account  
    756753        // otherwise danger of being stuck in a local minimum!! 
     
    785782 
    786783        //-- compute pvs 
     784 
    787785        frontData.mPvs = EvalPvsSize(*frontData.mRays); 
    788786        backData.mPvs = EvalPvsSize(*backData.mRays); 
     
    815813     
    816814        VspInterior *interior = new VspInterior(splitPlane); 
    817  
    818 #ifdef _DEBUG 
    819         Debug << interior << endl; 
    820 #endif+ 
    821815 
    822816 
     
    11961190        float minSum = 1e20f; 
    11971191 
    1198          
    11991192        // if no good split can be found, take mid split 
    12001193        position = minBox + 0.5f * sizeBox; 
     
    12091202 
    12101203        //-- traverse through visibility events 
    1211  
    12121204        vector<SortableEntry>::const_iterator ci, ci_end = mLocalSubdivisionCandidates->end(); 
    12131205 
     
    13731365        Intersectable::NewMail(3); 
    13741366        KdLeaf::NewMail(3); 
    1375         //for (int i=0;i<25;++i) BvhLeaf::NewMail(); 
    13761367        BvhLeaf::NewMail(3); 
    13771368 
     
    13921383                // evaluate contribution of ray endpoint to front and back pvs 
    13931384                // with respect to the classification 
    1394                 //Debug << "mail1:  " << BvhLeaf::sMailId << endl; 
    13951385                UpdateContributionsToPvs(*ray, true, cf, pvsFront, pvsBack, totalPvs);   
    1396                 //Debug << "mail2:  " << BvhLeaf::sMailId << endl; 
    13971386                UpdateContributionsToPvs(*ray, false, cf, pvsFront, pvsBack, totalPvs); 
    1398                 //Debug << "mail3:  " << BvhLeaf::sMailId << endl; 
    1399         } 
    1400  
     1387        } 
    14011388 
    14021389        AxisAlignedBox3 frontBox; 
     
    14121399 
    14131400        //-- pvs rendering heuristics 
     1401 
    14141402        const int lowerPvsLimit = mViewCellsManager->GetMinPvsSize(); 
    14151403        const int upperPvsLimit = mViewCellsManager->GetMaxPvsSize(); 
    14161404 
    1417         //-- only render cost heuristics or combined with standard deviation 
    1418  
     1405        // only render cost heuristics or combined with standard deviation 
    14191406        const float penaltyOld = EvalPvsPenalty((int)totalPvs, lowerPvsLimit, upperPvsLimit); 
    14201407    const float penaltyFront = EvalPvsPenalty((int)pvsFront, lowerPvsLimit, upperPvsLimit); 
     
    14841471         
    14851472#ifdef _DEBUG 
    1486         Debug << axis << " " << pvsSize << " " << pvsBack << " " << pvsFront << endl; 
    1487         Debug << pFront << " " << pBack << " " << pOverall << endl; 
     1473        Debug << "axis: " << axis << " " << pvsSize << " " << pvsBack << " " << pvsFront << endl; 
     1474        Debug << "p: " << pFront << " " << pBack << " " << pOverall << endl; 
    14881475#endif 
    14891476 
     
    26622649        VspSubdivisionCandidate *splitCandidate = new VspSubdivisionCandidate(vData); 
    26632650    EvalSubdivisionCandidate(*splitCandidate); 
     2651        leaf->SetSubdivisionCandidate(splitCandidate); 
    26642652 
    26652653        mTotalCost = (float)pvsSize; 
     
    26742662                                                                        vector<SubdivisionCandidate *> &dirtyList) const 
    26752663{ 
     2664 
    26762665        Intersectable *obj; 
    26772666        Vector3 pt; 
     
    26792668 
    26802669        ray.GetSampleData(isTermination, pt, &obj, &node); 
    2681  
     2670         
    26822671        if (!obj) return; 
    26832672 
     
    26932682                                dirtyList.push_back(leaf->mSubdivisionCandidate); 
    26942683                        } 
    2695  
    26962684                        break; 
    26972685                } 
    26982686        case HierarchyManager::BV_BASED_OBJ_SUBDIV: 
    26992687                { 
     2688                        BvhLeaf *leaf = mHierarchyManager->mBvHierarchy->GetLeaf(obj); 
     2689 
     2690                        if (!leaf->Mailed()) 
     2691                        { 
     2692                                leaf->Mail(); 
     2693                                dirtyList.push_back(leaf->GetSubdivisionCandidate()); 
     2694                                Debug << "here120 candidate: " << leaf->GetSubdivisionCandidate() << " type: " << leaf->GetSubdivisionCandidate()->Type() << endl; 
     2695                        } 
     2696                        break; 
    27002697                } 
    27012698                break; 
     
    27142711        KdLeaf::NewMail(); 
    27152712        BvhLeaf::NewMail(); 
    2716  
     2713         
    27172714        RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 
    27182715 
     
    27212718        { 
    27222719                VssRay *ray = (*rit).mRay; 
    2723          
     2720                 
    27242721                CollectDirtyCandidate(*ray, true, dirtyList); 
    27252722                CollectDirtyCandidate(*ray, false, dirtyList); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r1297 r1302  
    3636class VspTree; 
    3737class KdTreeStatistics; 
    38 class SubdivisionCandidate; 
    39 class VspSubdivisionCandidate; 
     38//class SubdivisionCandidate; 
     39//class VspSubdivisionCandidate; 
    4040 
    4141/** View space partition statistics. 
     
    482482        }; 
    483483 
    484         //typedef std::priority_queue<VspTraversalData> VspOspTraversalQueue; 
    485  
    486484        /** Default constructor creating an empty tree. 
    487485        */  
    488486        VspTree(); 
    489  
    490487        /** Default destructor. 
    491488        */ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp

    r1297 r1302  
    801801  // C = ct_div_ci  + (ql*rl + qr*rr)/queries 
    802802         
    803   int rl=0, rr = leaf->rays.size(); 
    804   int pl=0, pr = leaf->GetPvsSize(); 
     803  int rl=0, rr = (int)leaf->rays.size(); 
     804  int pl=0, pr = (int)leaf->GetPvsSize(); 
    805805  float sizeBox = maxBox - minBox; 
    806806         
    807   float minBand = minBox + 0.1*(maxBox - minBox); 
    808   float maxBand = minBox + 0.9*(maxBox - minBox); 
     807  float minBand = minBox + 0.1f*(maxBox - minBox); 
     808  float maxBand = minBox + 0.9f*(maxBox - minBox); 
    809809         
    810810  float minRatio = 1e20f; 
     
    901901  splitCandidates->clear(); 
    902902   
    903   int requestedSize = 2*(node->rays.size()); 
     903  int requestedSize = 2*((int)node->rays.size()); 
    904904  // creates a sorted split candidates array 
    905905  if (splitCandidates->capacity() > 500000 && 
     
    13041304         
    13051305                if (removeAllScheduledRays) { 
    1306                   int tail = leaf->rays.size()-1; 
     1306                  int tail = (int)leaf->rays.size()-1; 
    13071307 
    13081308                  for (int i=0; i < (int)(leaf->rays.size()); i++) { 
     
    16641664          VssTreeLeaf *leaf = (VssTreeLeaf *)node; 
    16651665          float c = leaf->GetImportance(); 
    1666           int num = (c*ratioPerLeaf + 0.5f); 
     1666          int num = int(c*ratioPerLeaf + 0.5f); 
    16671667          //                    cout<<num<<" "; 
    16681668 
     
    16831683  } 
    16841684 
    1685   return rays.size(); 
     1685  return (int)rays.size(); 
    16861686} 
    16871687 
     
    19751975        } 
    19761976  } 
    1977   return rays.size(); 
     1977  return (int)rays.size(); 
    19781978} 
    19791979 
     
    20092009  } 
    20102010   
    2011   return rays.size(); 
    2012 } 
    2013  
    2014 } 
     2011  return (int)rays.size(); 
     2012} 
     2013 
     2014} 
Note: See TracChangeset for help on using the changeset viewer.