Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2010, 12:39:46 AM (15 years ago)
Author:
landauf
Message:

removed some tabs in Dynamicmatch and ScreenshotManager

Location:
code/branches/presentation3/src/modules/designtools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc

    r7041 r7076  
    3939        mWindowHeight  = pRenderWindow->getHeight();
    4040        //create temporary texture
    41         mTempTex = Ogre::TextureManager::getSingleton().createManual("ScreenShotTex", 
     41        mTempTex = Ogre::TextureManager::getSingleton().createManual("ScreenShotTex",
    4242                                                                  Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D,
    43                                                                     mWindowWidth, mWindowHeight,0, Ogre::PF_B8G8R8, Ogre::TU_RENDERTARGET); 
    44        
     43                                                                    mWindowWidth, mWindowHeight,0, Ogre::PF_B8G8R8, Ogre::TU_RENDERTARGET);
     44
    4545        //get The current Render Target of the temp Texture
    4646        mRT = mTempTex->getBuffer()->getRenderTarget();
    4747
    48         //HardwarePixelBufferSharedPtr to the Buffer of the temp Texture 
     48        //HardwarePixelBufferSharedPtr to the Buffer of the temp Texture
    4949        mBuffer = mTempTex->getBuffer();
    5050
     
    7272        std::string fileName = PathConfig::getInstance().getLogPathString() + "screenshot_" + this->getTimestamp();
    7373
    74         //Remove all viewports, so the added Viewport(camera) ist the only 
     74        //Remove all viewports, so the added Viewport(camera) ist the only
    7575        mRT->removeAllViewports();
    7676        mRT->addViewport(camera);
    77                
     77
    7878        //set the viewport settings
    7979        Ogre::Viewport *vp = mRT->getViewport(0);
    80         vp->setClearEveryFrame(true); 
     80        vp->setClearEveryFrame(true);
    8181        vp->setOverlaysEnabled(false);
    8282
     
    103103            // set the original Frustum extents
    104104            camera->getFrustumExtents(originalFrustumLeft, originalFrustumRight, originalFrustumTop, originalFrustumBottom);
    105            
     105
    106106            // compute the Stepsize for the drid
    107107            Ogre::Real frustumGridStepHorizontal  = (originalFrustumRight * 2) / mGridSize;
     
    110110            // process each grid
    111111            Ogre::Real frustumLeft, frustumRight, frustumTop, frustumBottom;
    112             for (unsigned int nbScreenshots = 0; nbScreenshots < mGridSize * mGridSize; nbScreenshots++) 
    113             { 
    114                 int y = nbScreenshots / mGridSize; 
    115                 int x = nbScreenshots - y * mGridSize; 
    116                
     112            for (unsigned int nbScreenshots = 0; nbScreenshots < mGridSize * mGridSize; nbScreenshots++)
     113            {
     114                int y = nbScreenshots / mGridSize;
     115                int x = nbScreenshots - y * mGridSize;
     116
    117117                // Shoggoth frustum extents setting
    118118                // compute the new frustum extents
     
    121121                frustumTop    = originalFrustumTop - frustumGridStepVertical * y;
    122122                frustumBottom  = frustumTop - frustumGridStepVertical;
    123                
     123
    124124                // set the frustum extents value to the camera
    125125                camera->setFrustumExtents(frustumLeft, frustumRight, frustumTop, frustumBottom);
     
    128128                Ogre::Root::getSingletonPtr()->clearEventTimes();
    129129                mRT->update();    //render
    130                
    131                 //define the current 
     130
     131                //define the current
    132132                Ogre::Box subBox = Ogre::Box(x* mWindowWidth,y * mWindowHeight,x * mWindowWidth + mWindowWidth, y * mWindowHeight + mWindowHeight);
    133                 //copy the content from the temp buffer into the final picture PixelBox 
     133                //copy the content from the temp buffer into the final picture PixelBox
    134134                //Place the tempBuffer content at the right position
    135135                mBuffer->blitToMemory(mFinalPicturePB.getSubVolume(subBox));
    136136
    137137            }
    138            
     138
    139139            // set frustum extents to previous settings
    140140            camera->resetFrustumExtents();
    141            
     141
    142142            Ogre::Image finalImage; //declare the final Image Object
    143143            //insert the PixelBox data into the Image Object
     
    145145            // Save the Final image to a file
    146146            finalImage.save(fileName + "." + mFileExtension);
    147            
     147
    148148        }
    149149
     
    163163        pTime = localtime( &ctTime );
    164164        std::ostringstream oss;
    165         oss     << std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1)
     165        oss << std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1)
    166166            << std::setw(2) << std::setfill('0') << pTime->tm_mday
    167167            << std::setw(2) << std::setfill('0') << (pTime->tm_year + 1900)
  • code/branches/presentation3/src/modules/designtools/ScreenshotManager.h

    r7044 r7076  
    2121
    2222
    23     /* Class encapsulates Screenshot functionality and provides a method for making multi grid screenshots.     
     23    /* Class encapsulates Screenshot functionality and provides a method for making multi grid screenshots.
    2424    *  pRenderWindow:    Pointer to the render window.  This could be "mWindow" from the ExampleApplication,
    2525    *              the window automatically created obtained when calling
     
    4848        static void makeScreenshot_s()
    4949            { getInstance().makeScreenshot(); }
    50      
     50
    5151    protected:
    5252        static std::string getTimestamp();
Note: See TracChangeset for help on using the changeset viewer.