- Timestamp:
- 07/02/07 20:26:26 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp
r2333 r2495 96 96 light = *(list.begin()); 97 97 98 sharedRuns->updateBounds(); 99 98 100 if(light!= 0) 99 101 { … … 103 105 photonMapCamera->setDirection( dir ); 104 106 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); 106 109 photonMapCamera->setProjectionType(PT_ORTHOGRAPHIC); 107 110 Matrix4 proj; … … 114 117 { 115 118 Vector3 pos = light->getDerivedPosition(); 116 Vector3 dir = sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP) - pos; 119 Vector3 center = sharedRuns->getRootPosition(ILLUMRUN_PHOTONMAP); 120 Vector3 dir = center - pos; 117 121 Real r = sharedRuns->getRootBoundingSphere(ILLUMRUN_PHOTONMAP).getRadius(); 118 122 Real d = dir.length();
Note: See TracChangeset
for help on using the changeset viewer.