- Timestamp:
- 06/27/06 10:21:48 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreChildParticlesystemRenderingRun.cpp
r1055 r1062 47 47 RenderTarget* rt = hpb->getRenderTarget(); 48 48 Viewport* v = rt->addViewport(impostorCamera); 49 v->setBackgroundColour(ColourValue(0,1,0,0)); 49 50 v->setOverlaysEnabled(false); 50 51 rt->setAutoUpdated(false); … … 60 61 rq->clear(); 61 62 63 sharedRuns->getRoot()->updateBounds(); 62 64 Sphere boundSphere = ((OgreSharedRuns*)sharedRuns->getRoot(ILLUMRUN_HPP_IMPOSTOR))->getBoundingSphere(); 63 65 Camera* mainCam = OgreIlluminationManager::getSingleton().getMainCamera(); … … 65 67 Vector3 dir = boundSphere.getCenter() - mainCam->getPosition(); 66 68 float r = boundSphere.getRadius(); 69 r = 200; 67 70 float d = dir.normalise(); 68 71 impostorCamera->setDirection(dir); … … 72 75 impostorCamera->setProjectionType(PT_PERSPECTIVE); 73 76 impostorCamera->setAspectRatio(1.0); 74 Radian a = Math::ASin(r / d) ;75 impostorCamera->setFOVy( a * 2.0);76 impostorCamera->setNearClipDistance( std::max(0.01f, d - r));77 impostorCamera->setFarClipDistance( r + d);77 Radian a = Math::ASin(r / d) * 2.0; 78 impostorCamera->setFOVy(/*a*/ Radian(Degree(90))); 79 impostorCamera->setNearClipDistance(/*std::max(0.01f, d - r)*/0.1); 80 impostorCamera->setFarClipDistance(/*r + d*/1000); 78 81 } 79 82 else … … 100 103 rt->update(); 101 104 102 /* 103 static int framecount = 0; 104 String filename = "photon"; 105 filename.append(this->name); 106 //filename.append(StringConverter::toString(framecount)); 107 filename.append(".png"); 108 rt->writeContentsToFile(filename); 109 framecount++; 110 */ 105 106 static int framecount = 0; 107 String filename = "impostor"; 108 filename.append(this->name); 109 //filename.append(StringConverter::toString(framecount)); 110 filename.append(".dds"); 111 rt->writeContentsToFile(filename); 112 framecount++; 111 113 112 114 if(!useOwnMaterial)
Note: See TracChangeset
for help on using the changeset viewer.