Changeset 2495 for GTP/trunk/Lib
- Timestamp:
- 07/02/07 20:26:26 (17 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderable.cpp
r2475 r2495 135 135 boundingBox = parentEntity->getWorldBoundingBox(true); 136 136 137 Vector3 center = (boundingBox.getMaximum() + boundingBox.getM aximum()) / 2.0;137 Vector3 center = (boundingBox.getMaximum() + boundingBox.getMinimum()) / 2.0; 138 138 float radius = (center - boundingBox.getMaximum()).length(); 139 139 boundingSphere.setRadius(radius); 140 140 boundingSphere.setCenter(center); 141 //boundingSphere = parentEntity->getWorldBoundingSphere(true);141 // boundingSphere = parentEntity->getWorldBoundingSphere(true); 142 142 break; 143 143 } -
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.