Show
Ignore:
Timestamp:
10/23/06 12:00:07 (2 years ago)
Author:
dshipton
Message:

Knobs for ScreenLOD node. and more code in ScreenLOD that doesn't work!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGScreenLOD.inl

    r359 r360  
    4545{ 
    4646    RenderTraversalActionT  *ra        = dynamic_cast<RenderTraversalActionT  *>(action); 
     47    DrawActionBase  *da        = dynamic_cast<DrawActionBase  *>(action); 
    4748 
    4849    UInt32          numLevels = action->getNNodes(); 
     
    5354    Int32           index     = 0; 
    5455 
    55     if(numLevels > 1
     56    if(numLevels > 1 || ra->getScreenLODCoverageThreshold() == 0.f
    5657    { 
    5758        Matrixr worldToScreen; 
     59#if 1 
    5860        Camera* cam = ra->getCamera(); 
    5961        Viewport* vp = ra->getViewport(); 
    6062        cam->getWorldToScreen(worldToScreen, *vp); 
     63#endif 
     64#if 0 
     65        worldToScreen = da->getDrawEnv()->getWorldToScreen(); 
     66#endif 
    6167         
    6268        DynamicVolume volume = ra->getActNode()->getVolume(); 
     
    103109        //Real32 pix = cbb * vp->getPixelWidth() * vp->getPixelHeight(); 
    104110 
    105 #if 0 
     111#if 0  
    106112        //THIS IS WHAT I WANT TO DO....but the calls to validate never return 
    107113        Geometry* pmin = dynamic_cast<Geometry *>(getCPtr(action->getNode(0))); 
     
    130136        } 
    131137#endif 
    132  
    133         Real32 degradation_base = 0.05
     138#if 1 
     139        Real32 degradation_base = ra->getScreenLODCoverageThreshold()
    134140        while(cbb < degradation_base) 
    135141        { 
     
    142148            } 
    143149        } 
     150#endif 
    144151    } 
    145152