Ignore:
Timestamp:
07/02/07 20:26:26 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp

    r2333 r2495  
    9696        light = *(list.begin()); 
    9797 
     98        sharedRuns->updateBounds(); 
     99 
    98100        if(light!= 0) 
    99101        { 
     
    103105                        photonMapCamera->setDirection( dir ); 
    104106                        Real r = sharedRuns->getRootBoundingSphere(ILLUMRUN_PHOTONMAP).getRadius(); 
    105                         photonMapCamera->setPosition( sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP) - dir * r); 
     107                        Vector3 center = sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP); 
     108                        photonMapCamera->setPosition( center - dir * r); 
    106109                        photonMapCamera->setProjectionType(PT_ORTHOGRAPHIC); 
    107110                        Matrix4 proj; 
     
    114117                {                        
    115118                        Vector3 pos = light->getDerivedPosition(); 
    116                         Vector3 dir = sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP) - pos; 
     119                        Vector3 center = sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP); 
     120                        Vector3 dir = center - pos; 
    117121                        Real r = sharedRuns->getRootBoundingSphere(ILLUMRUN_PHOTONMAP).getRadius(); 
    118122                        Real d = dir.length(); 
Note: See TracChangeset for help on using the changeset viewer.