Ignore:
Timestamp:
10/31/06 10:57:14 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1701 r1703  
    3333#define KD_PVS_AREA (5*1e-4f) 
    3434 
     35 
     36 
    3537namespace GtpVisibilityPreprocessor { 
    3638 
     
    3840// HACK 
    3941const static bool SAMPLE_AFTER_SUBDIVISION = true; 
    40 const static bool CLAMP_TO_BOX = true; 
     42const static bool CLAMP_TO_BOX = false; 
     43 
     44int ViewCellsManager::sRenderCostEvaluationType = 0; 
     45 
    4146 
    4247template <typename T> class myless 
     
    101106        Environment::GetSingleton()->GetIntValue("ViewCells.Filter.maxSize", mMaxFilterSize); 
    102107        Environment::GetSingleton()->GetFloatValue("ViewCells.Filter.width", mFilterWidth); 
    103         Environment::GetSingleton()->GetIntValue("ViewCells.renderCostEvaluationType", mRenderCostEvaluationType); 
     108        Environment::GetSingleton()->GetIntValue("ViewCells.renderCostEvaluationType", sRenderCostEvaluationType); 
    104109 
    105110        Environment::GetSingleton()->GetBoolValue("ViewCells.exportBboxesForPvs", mExportBboxesForPvs); 
     
    179184        if (strcmp(buf, "perobject") == 0) 
    180185        { 
    181                 mRenderCostEvaluationType = ViewCellsManager::PER_OBJECT; 
    182         } 
    183         else if (strcmp(buf, "directional") == 0) 
    184         { 
    185                 mRenderCostEvaluationType = ViewCellsManager::PER_TRIANGLE; 
     186                sRenderCostEvaluationType = ViewCellsManager::PER_OBJECT; 
     187        } 
     188        else if (strcmp(buf, "pertriangle") == 0) 
     189        { 
     190                sRenderCostEvaluationType = ViewCellsManager::PER_TRIANGLE; 
    186191        } 
    187192        else  
     
    224229        Debug << "evaluate view cells: " << mEvaluateViewCells << endl; 
    225230        Debug << "sampling type: " << mSamplingType << endl; 
    226         Debug << "render cost evaluation type: " << mRenderCostEvaluationType << endl; 
     231        Debug << "render cost evaluation type: " << sRenderCostEvaluationType << endl; 
    227232        Debug << "evaluation sampling type: " << mEvaluationSamplingType << endl; 
    228233        Debug << "show visualization: " << mShowVisualization << endl; 
     
    10911096 
    10921097 
    1093 float ViewCellsManager::EvalRenderCost(Intersectable *obj) const 
    1094 { 
    1095         switch (mRenderCostEvaluationType) 
     1098float ViewCellsManager::EvalRenderCost(Intersectable *obj) //const 
     1099{ 
     1100        switch (sRenderCostEvaluationType) 
    10961101        { 
    10971102        case PER_OBJECT: 
    1098                 //cout << "perobject" << endl; 
    10991103                return 1.0f; 
    11001104         
    11011105        case PER_TRIANGLE: 
    1102                 {//cout << "pertriangle" << endl; 
     1106                { 
    11031107                        return (float)obj->NumberOfFaces(); 
    11041108                } 
     
    51875191                AxisAlignedBox3 bbox = mViewSpaceBox; 
    51885192                bbox.Scale(Vector3(0.5, 1, 0.5)); 
     5193 
    51895194                if (CLAMP_TO_BOX) 
    51905195                {        
     
    52045209                } 
    52055210 
    5206                 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects, CLAMP_TO_BOX ? &bbox : NULL, false); 
     5211                mHierarchyManager->ExportObjectSpaceHierarchy(exporter,  
     5212                                objects, CLAMP_TO_BOX ? &bbox : NULL, false); 
    52075213                ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, GetClipPlane()); 
    52085214 
Note: See TracChangeset for help on using the changeset viewer.