Changeset 1772


Ignore:
Timestamp:
11/20/06 18:44:29 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
12 edited

Legend:

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

    r1768 r1772  
    22862286} 
    22872287 
    2288 } 
    2289  
     2288 
     2289Vector3 AxisAlignedBox3::GetRandomSurfacePoint() const 
     2290{ 
     2291        const int idx = Random(6); 
     2292 
     2293        const Rectangle3 face = GetFace(idx); 
     2294 
     2295        Vector3 point = Vector3(0,0,0); 
     2296        float sum = 0.0f; 
     2297 
     2298        for (int i = 0; i < 4; ++ i)  
     2299        { 
     2300                const float r = RandomValue(0, 1); 
     2301                sum += r; 
     2302                point += face.mVertices[i] * r; 
     2303        } 
     2304 
     2305        point *= 1.0f / sum; 
     2306 
     2307        //normal = face.GetNormal(); 
     2308 
     2309        return point; 
     2310} 
     2311 
     2312 
     2313} 
     2314 
  • GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h

    r1768 r1772  
    182182 
    183183  Vector3 GetRandomPoint() const; 
    184  
     184  Vector3 GetRandomSurfacePoint() const; 
    185185 
    186186  Vector3 GetPoint(const Vector3 &p) const { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mesh.cpp

    r1769 r1772  
    422422Mesh::GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) 
    423423{ 
    424   //const int faceIndex = (int)RandomValue(0, (Real)((int)mFaces.size()-1)); 
     424        //const int faceIndex = (int)RandomValue(0, (Real)((int)mFaces.size()-1)); 
    425425        const int faceIndex = (int)RandomValue(0, (Real)mFaces.size() - 0.5f); 
    426426 
    427   // assume the face is convex and generate a convex combination 
    428   // 
    429   Face *face = mFaces[faceIndex]; 
    430   
    431   point = Vector3(0,0,0); 
    432   float sum = 0.0f; 
    433    
    434   for (int i = 0; i < face->mVertexIndices.size(); i++) { 
    435     float r = RandomValue(0,1); 
    436     sum += r; 
    437     point += mVertices[face->mVertexIndices[i]]*r; 
    438   } 
    439   point *= 1.0f/sum; 
    440          
     427        // assume the face is convex and generate a convex combination 
     428        Face *face = mFaces[faceIndex]; 
     429 
     430        point = Vector3(0,0,0); 
     431        float sum = 0.0f; 
     432 
     433        for (int i = 0; i < face->mVertexIndices.size(); i++) { 
     434                float r = RandomValue(0,1); 
     435                sum += r; 
     436                point += mVertices[face->mVertexIndices[i]]*r; 
     437        } 
     438        point *= 1.0f/sum; 
     439 
    441440        normal = GetFacePlane(faceIndex).mNormal; 
    442441 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1771 r1772  
    945945                                                   SimpleRayContainer &rays) 
    946946{ 
    947   return strategy.GenerateSamples(number, rays); 
     947        return strategy.GenerateSamples(number, rays); 
    948948} 
    949949 
     
    953953                                                   SimpleRayContainer &rays) 
    954954{ 
    955   const int startSize = (int)rays.size(); 
    956   SamplingStrategy *strategy = GenerateSamplingStrategy(sampleType); 
    957   int castRays = 0; 
    958    
    959   if (!strategy) 
    960         { 
    961           return 0; 
    962         } 
    963    
     955        const int startSize = (int)rays.size(); 
     956        SamplingStrategy *strategy = GenerateSamplingStrategy(sampleType); 
     957        int castRays = 0; 
     958 
     959        if (!strategy) 
     960        { 
     961                return 0; 
     962        } 
     963 
    964964#if 1 
    965   if (!strategy->GenerateSamples(number, rays)) 
    966         return false; 
    967   ++ castRays; 
     965        castRays = strategy->GenerateSamples(number, rays); 
    968966#else 
    969   GenerateRayBundle(rays, newRay, 16, 0); 
    970   castRays += 16; 
     967        GenerateRayBundle(rays, newRay, 16, 0); 
     968        castRays += 16; 
    971969#endif 
    972    
    973   delete strategy; 
    974   return castRays; 
     970 
     971        delete strategy; 
     972        return castRays; 
    975973} 
    976974 
     
    994992        case SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION: 
    995993                return new ViewCellBorderBasedDistribution(*this); 
     994        case SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION: 
     995                return new ViewSpaceBorderBasedDistribution(*this); 
     996        case SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION: 
     997                return new ReverseViewSpaceBorderBasedDistribution(*this); 
    996998        //case OBJECTS_INTERIOR_DISTRIBUTION: 
    997999        //      return new ObjectsInteriorDistribution(*this); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Rectangle3.h

    r863 r1772  
    1515  Vector3 mVertices[4]; 
    1616 
    17   Vector3 GetVertex(const int i) const { return mVertices[i]; } 
     17  inline Vector3 GetVertex(const int i) const { return mVertices[i]; } 
    1818  Rectangle3() {} 
    1919   
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r1771 r1772  
    2424                                                                  SimpleRayContainer &rays) const 
    2525{ 
    26   SimpleRay ray; 
    27   int i = 0; 
    28   for (; i < number; i++) { 
    29         if (!GenerateSample(ray)) 
    30           return i; 
    31         rays.push_back(ray); 
    32   } 
    33  
    34   return i; 
     26        SimpleRay ray; 
     27        int samples = 0; 
     28        int i = 0; 
     29        const int maxTries = 20; 
     30        // tmp changed matt. Q: should one rejected sample  
     31        // terminate the whole method? 
     32        if (0) 
     33        { 
     34                for (; i < number; i++) { 
     35                        if (!GenerateSample(ray)) 
     36                                return i; 
     37                        rays.push_back(ray); 
     38                } 
     39        } 
     40        else 
     41        { 
     42                for (; i < number; i++)  
     43                { 
     44                        int j = 0; 
     45                        bool sampleGenerated = false; 
     46 
     47                        for (j = 0; !sampleGenerated && (j < maxTries); ++ j) 
     48                        { 
     49                                sampleGenerated = GenerateSample(ray); 
     50 
     51                                if (sampleGenerated) 
     52                                {                
     53                                        ++ samples; 
     54                                        rays.push_back(ray); 
     55                                } 
     56                        } 
     57                } 
     58        } 
     59         
     60        return samples; 
    3561} 
    3662 
     
    196222        direction *= 1.0f / c; 
    197223        // a little offset 
    198         point += direction * 0.01f; 
     224        point += direction * 0.001f; 
    199225 
    200226        ray = SimpleRay(point, direction, pdf); 
     
    279305#endif 
    280306 
     307 
     308bool ReverseViewSpaceBorderBasedDistribution::GenerateSample(SimpleRay &ray) const 
     309{ 
     310        Vector3 origin, direction;  
     311 
     312        origin = mPreprocessor.mViewCellsManager->GetViewSpaceBox().GetRandomSurfacePoint(); 
     313 
     314        Vector3 point; 
     315        Vector3 normal; 
     316        //cout << "y"; 
     317        const int i = (int)RandomValue(0, (float)mPreprocessor.mObjects.size() - 0.5f); 
     318 
     319        Intersectable *object = mPreprocessor.mObjects[i]; 
     320 
     321        object->GetRandomSurfacePoint(point, normal); 
     322         
     323        direction = origin - point; 
     324         
     325        // $$ jb the pdf is yet not correct for all sampling methods! 
     326        const float c = Magnitude(direction); 
     327         
     328        if ((c <= Limits::Small) || (DotProd(direction, normal) < 0)) 
     329        { 
     330                return false; 
     331        } 
     332 
     333        // $$ jb the pdf is yet not correct for all sampling methods! 
     334        const float pdf = 1.0f; 
     335        //cout << "p: " << point << " "; 
     336        direction *= 1.0f / c; 
     337        // a little offset 
     338        point += direction * 0.001f; 
     339 
     340        ray = SimpleRay(point, direction, pdf); 
     341         
     342        return true; 
     343} 
     344 
     345 
     346bool ViewSpaceBorderBasedDistribution::GenerateSample(SimpleRay &ray) const 
     347{ 
     348        Vector3 origin, direction;  
     349 
     350        origin = mPreprocessor.mViewCellsManager->GetViewSpaceBox().GetRandomSurfacePoint(); 
     351 
     352        Vector3 point; 
     353        Vector3 normal; 
     354        //cout << "w"; 
     355        const int i = (int)RandomValue(0, (float)mPreprocessor.mObjects.size() - 0.5f); 
     356 
     357        Intersectable *object = mPreprocessor.mObjects[i]; 
     358 
     359        object->GetRandomSurfacePoint(point, normal); 
     360        direction = point - origin; 
     361 
     362        // $$ jb the pdf is yet not correct for all sampling methods! 
     363        const float c = Magnitude(direction); 
     364 
     365        if (c <= Limits::Small)  
     366                return false; 
     367 
     368        // $$ jb the pdf is yet not correct for all sampling methods! 
     369        const float pdf = 1.0f; 
     370         
     371        direction *= 1.0f / c; 
     372 
     373        // a little offset 
     374        origin += direction * 0.001f; 
     375 
     376        ray = SimpleRay(origin, direction, pdf); 
     377 
     378        return true; 
     379} 
     380 
     381 
    281382bool 
    282383RssBasedDistribution::GenerateSample(SimpleRay &ray) const 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h

    r1771 r1772  
    1414class SamplingStrategy 
    1515{ 
    16  public: 
    17  
    18          /** Sample rays of particular type 
    19          */ 
    20          enum  
    21          { 
    22                  OBJECT_BASED_DISTRIBUTION, 
    23                  DIRECTION_BASED_DISTRIBUTION, 
    24                  DIRECTION_BOX_BASED_DISTRIBUTION, 
    25                  SPATIAL_BOX_BASED_DISTRIBUTION, 
    26                  RSS_BASED_DISTRIBUTION, 
    27                  RSS_SILHOUETTE_BASED_DISTRIBUTION, 
    28                  VSS_BASED_DISTRIBUTION, 
    29                  OBJECT_DIRECTION_BASED_DISTRIBUTION, 
    30                  OBJECTS_INTERIOR_DISTRIBUTION, 
    31                  REVERSE_OBJECT_BASED_DISTRIBUTION, 
    32                  VIEWCELL_BORDER_BASED_DISTRIBUTION 
    33          }; 
    34    
    35   /** Default constructor 
    36    */ 
    37   SamplingStrategy(const Preprocessor &preprocessor); 
    38    
    39   virtual ~SamplingStrategy(); 
    40    
    41   /** Each strategy has to implement this function. 
    42           @returns true if generated valid sample. 
    43   */ 
    44  
    45   virtual int GenerateSamples(const int number, SimpleRayContainer &rays) const; 
    46  
    47 private: 
    48  
    49   virtual bool GenerateSample(SimpleRay &ray) const = 0; 
    50  
    5116public: 
    52   /// variables usefull for mixed distribution sampling 
    53   int mType; 
    54   int mRays; 
    55   float mContribution; 
    56   float mTime; 
    57   float mRatio; 
    58    
     17 
     18        /** Sample rays of particular type 
     19        */ 
     20        enum  
     21        { 
     22                OBJECT_BASED_DISTRIBUTION, 
     23                DIRECTION_BASED_DISTRIBUTION, 
     24                DIRECTION_BOX_BASED_DISTRIBUTION, 
     25                SPATIAL_BOX_BASED_DISTRIBUTION, 
     26                RSS_BASED_DISTRIBUTION, 
     27                RSS_SILHOUETTE_BASED_DISTRIBUTION, 
     28                VSS_BASED_DISTRIBUTION, 
     29                OBJECT_DIRECTION_BASED_DISTRIBUTION, 
     30                OBJECTS_INTERIOR_DISTRIBUTION, 
     31                REVERSE_OBJECT_BASED_DISTRIBUTION, 
     32                VIEWCELL_BORDER_BASED_DISTRIBUTION, 
     33                VIEWSPACE_BORDER_BASED_DISTRIBUTION, 
     34                REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION 
     35        }; 
     36 
     37        /** Default constructor 
     38        */ 
     39        SamplingStrategy(const Preprocessor &preprocessor); 
     40 
     41        virtual ~SamplingStrategy(); 
     42 
     43        /** Each strategy has to implement this function. 
     44        @returns true if generated valid sample. 
     45        */ 
     46 
     47        virtual int GenerateSamples(const int number, SimpleRayContainer &rays) const; 
     48 
     49private: 
     50 
     51        virtual bool GenerateSample(SimpleRay &ray) const = 0; 
     52 
     53public: 
     54        /// variables usefull for mixed distribution sampling 
     55        int mType; 
     56        int mRays; 
     57        float mContribution; 
     58        float mTime; 
     59        float mRatio; 
     60 
    5961protected: 
    60    
    61   const Preprocessor &mPreprocessor; 
    62    
     62 
     63        const Preprocessor &mPreprocessor; 
     64 
    6365}; 
    6466 
     
    134136         SpatialBoxBasedDistribution(const Preprocessor &preprocessor): 
    135137           SamplingStrategy(preprocessor){ 
     138           mType = DIRECTION_BOX_BASED_DISTRIBUTION; 
     139         } 
     140            
     141private: 
     142           virtual bool GenerateSample(SimpleRay &ray) const; 
     143}; 
     144 
     145 
     146class ViewSpaceBorderBasedDistribution: public SamplingStrategy 
     147{ 
     148 public: 
     149         ViewSpaceBorderBasedDistribution(const Preprocessor &preprocessor): 
     150           SamplingStrategy(preprocessor){ 
    136151           mType = SPATIAL_BOX_BASED_DISTRIBUTION; 
    137152         } 
     
    140155         virtual bool GenerateSample(SimpleRay &ray) const; 
    141156}; 
     157 
     158 
     159class ReverseViewSpaceBorderBasedDistribution: public SamplingStrategy 
     160{ 
     161 public: 
     162         ReverseViewSpaceBorderBasedDistribution(const Preprocessor &preprocessor): 
     163           SamplingStrategy(preprocessor){ 
     164           mType = SPATIAL_BOX_BASED_DISTRIBUTION; 
     165         } 
     166          
     167private: 
     168         virtual bool GenerateSample(SimpleRay &ray) const; 
     169}; 
     170 
    142171 
    143172class RssBasedDistribution: public SamplingStrategy 
     
    159188   
    160189}; 
     190 
    161191 
    162192class ViewCellBorderBasedDistribution: public SamplingStrategy 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r1770 r1772  
    206206                                Name="VCLinkerTool" 
    207207                                AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtGlRenderer.lib" 
    208                                 OutputFile="../bin/release/Preprocessor.exe" 
     208                                OutputFile="../bin/release/Preprocessor2.exe" 
    209209                                LinkIncremental="1" 
    210210                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;&quot;$(QTDIR)\lib&quot;;.\QtGlRenderer\Release" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp

    r1764 r1772  
    262262                                                        const float pdf,  
    263263                                                        float &contribution) 
    264 { cout << "here15" << endl; 
     264{  
    265265        const bool result = mPvs.AddSample(sample, pdf, contribution); 
    266266        // have to recompute pvs size 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1771 r1772  
    320320         
    321321        const int numRaysPerPass = samplesPerPass / (int)strategies.size(); 
    322  
    323322        vector<int>::const_iterator iit, iit_end = strategies.end(); 
    324323 
    325324        for (iit = strategies.begin(); iit != iit_end; ++ iit) 
    326325        { 
    327                 int stype = *iit; 
     326                const int stype = *iit; 
    328327                const int newRays =  
    329328                        mPreprocessor->GenerateRays(numRaysPerPass, stype, simpleRays); 
    330          
     329 
    331330                cout << "cast " << newRays << " rays of strategy " << stype << endl; 
    332331                castRays += newRays; 
     
    394393        // mix of sampling strategies 
    395394        vector<int> strategies; 
    396         strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
    397         strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
    398         strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
     395         
     396        if (0) 
     397        { 
     398                strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
     399                strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
     400                strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
     401        } 
     402        else 
     403        { 
     404                strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     405                //strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     406        } 
    399407 
    400408        // cast initial samples 
     
    838846        for (; it != it_end; ++it) { 
    839847          //(*it)->UpdatePvsCost(); 
    840           (*it)->SetPvsCost((*it)->GetFilteredPvsSize()); 
    841         } 
    842          
     848          (*it)->SetPvsCost((float)(*it)->GetFilteredPvsSize()); 
     849        } 
    843850 
    844851        float maxPvs, maxVal, minVal; 
     
    989996        // mix of sampling strategies 
    990997        vector<int> strategies; 
    991         strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
    992         strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
    993         strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
     998         
     999        if (0) 
     1000        { 
     1001                strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
     1002                strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
     1003                strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
     1004        } 
     1005        else 
     1006        { 
     1007                strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     1008                strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     1009        } 
    9941010 
    9951011        cout << "finished" << endl; 
     
    59805996    // mix of sampling strategies 
    59815997        vector<int> strategies; 
    5982         strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
    5983         strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
    5984         strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
    5985 //strategies.push_back(SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION); 
     5998         
     5999        if (0) 
     6000        { 
     6001                strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 
     6002                strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
     6003                strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
     6004        } 
     6005        else 
     6006        { 
     6007                strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     6008                strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
     6009        } 
     6010 
    59866011        cout << "reseting pvs ... "; 
    59876012                 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r1767 r1772  
    14961496        //-- compute cost 
    14971497 
    1498         const int lowerPvsLimit = mViewCellsManager->GetMinPvsSize(); 
    1499         const int upperPvsLimit = mViewCellsManager->GetMaxPvsSize(); 
     1498        const float lowerPvsLimit = (float)mViewCellsManager->GetMinPvsSize(); 
     1499        const float upperPvsLimit = (float)mViewCellsManager->GetMaxPvsSize(); 
    15001500 
    15011501        const float pOverall = sizeBox; 
     
    20182018 
    20192019        // upper and lower bounds 
    2020         const int lowerPvsLimit = mViewCellsManager->GetMinPvsSize(); 
    2021         const int upperPvsLimit = mViewCellsManager->GetMaxPvsSize(); 
    2022  
    2023         const float penaltyOld = EvalPvsPenalty((int)totalPvs, lowerPvsLimit, upperPvsLimit); 
    2024     const float penaltyFront = EvalPvsPenalty((int)pvsFront, lowerPvsLimit, upperPvsLimit); 
    2025         const float penaltyBack = EvalPvsPenalty((int)pvsBack, lowerPvsLimit, upperPvsLimit); 
     2020        const float lowerPvsLimit = (float)mViewCellsManager->GetMinPvsSize(); 
     2021        const float upperPvsLimit = (float)mViewCellsManager->GetMaxPvsSize(); 
     2022 
     2023        const float penaltyOld = EvalPvsPenalty(totalPvs, lowerPvsLimit, upperPvsLimit); 
     2024    const float penaltyFront = EvalPvsPenalty(pvsFront, lowerPvsLimit, upperPvsLimit); 
     2025        const float penaltyBack = EvalPvsPenalty(pvsBack, lowerPvsLimit, upperPvsLimit); 
    20262026                         
    20272027        const float oldRenderCost = pOverall * penaltyOld; 
     
    21252125        } 
    21262126         
    2127  
    2128         // -- pvs rendering heuristics 
     2127        //////// 
     2128        //-- pvs rendering heuristics 
     2129 
    21292130        const int lowerPvsLimit = mViewCellsManager->GetMinPvsSize(); 
    21302131        const int upperPvsLimit = mViewCellsManager->GetMaxPvsSize(); 
    21312132 
    21322133        // only render cost heuristics or combined with standard deviation 
    2133         const float penaltyOld = EvalPvsPenalty((int)totalPvs, lowerPvsLimit, upperPvsLimit); 
    2134     const float penaltyFront = EvalPvsPenalty((int)pvsFront, lowerPvsLimit, upperPvsLimit); 
    2135         const float penaltyBack = EvalPvsPenalty((int)pvsBack, lowerPvsLimit, upperPvsLimit); 
     2134        const float penaltyOld = EvalPvsPenalty(totalPvs, lowerPvsLimit, upperPvsLimit); 
     2135    const float penaltyFront = EvalPvsPenalty(pvsFront, lowerPvsLimit, upperPvsLimit); 
     2136        const float penaltyBack = EvalPvsPenalty(pvsBack, lowerPvsLimit, upperPvsLimit); 
    21362137                         
    21372138        const float oldRenderCost = pOverall * penaltyOld; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1765 r1772  
    14111411        } 
    14121412         
    1413 //#ifdef GTP_DEBUG 
     1413#ifdef GTP_DEBUG 
    14141414        cout << "\n((((( eval local cost )))))" << endl 
    14151415                  << "back pvs: " << penaltyBack << " front pvs: " << penaltyFront << " total pvs: " << penaltyOld << endl  
     
    14171417                  << "old rc: " << oldRenderCost * volRatio << " new rc: " << newRenderCost * volRatio << endl 
    14181418                  << "render cost decrease: " << oldRenderCost * volRatio - newRenderCost * volRatio << endl; 
    1419 //#endif 
     1419#endif 
    14201420        return ratio; 
    14211421} 
Note: See TracChangeset for help on using the changeset viewer.