Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/skybox2/src/modules/designtools/SkyboxGenerator.cc @ 6616

Last change on this file since 6616 was 6616, checked in by gionc, 14 years ago

Added SkyboxGenerator class, implemented console command

File size: 2.9 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Gion-Andri Cantieni
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#include "SkyboxGenerator.h"
30
31#include <string>
32#include "core/ConsoleCommand.h"
33#include "core/CoreIncludes.h"
34#include "core/ConfigValueIncludes.h"
35#include "core/ScopedSingletonManager.h"
36 
37namespace orxonox
38{
39
40    SetConsoleCommand(SkyboxGenerator, createSkybox, true);
41
42    ManageScopedSingleton(SkyboxGenerator, ScopeID::Graphics, false);
43
44    SkyboxGenerator::SkyboxGenerator()
45    {
46        RegisterRootObject(SkyboxGenerator);
47
48        this->setConfigValues();
49    }
50
51    SkyboxGenerator::~SkyboxGenerator()
52    {
53
54    }
55
56    void SkyboxGenerator::setConfigValues( ) 
57    {
58        SetConfigValue(skyboxPrefix_, "SkyboxFile_");
59    }
60       
61        void SkyboxGenerator::createSkybox( ) 
62        {
63        //SkyboxGenerator* sbg = SkyboxGenerator::getInstancePtr();
64        //sbg->skyboxPrefix_;
65
66                /*unsigned int indice = 1;
67            char filename[30];
68            char fn[1];
69            // generate new names...
70            //sprintf(filename, "screenshot_%d.png", ++indice);
71            //sprintf(filename, fn, ++indice);
72            */ 
73
74             /*
75            if(stopper == 1){
76            //sprintf(filename, "stevecube_FR.bmp");
77            mWindow->writeContentsToFile("MySky_FR.bmp");   
78            }
79            else if(stopper == 2){
80            //sprintf(filename, "stevecube_LF.bmp");
81                cam->pitch(Ogre::Degree(90));
82            mWindow->writeContentsToFile("MySky_LF.bmp");
83            }
84            else if(stopper == 3){
85            //sprintf(filename, "stevecube_BK.bmp");
86                cam->pitch(Ogre::Degree(90));
87            mWindow->writeContentsToFile("MySky_BK.bmp");
88            }
89            else if(stopper == 4){
90            //sprintf(filename, "stevecube_RT.bmp");
91                cam->pitch(Ogre::Degree(90));
92            mWindow->writeContentsToFile("MySky_RT.bmp");
93            }
94            else if(stopper == 5){
95            //sprintf(filename, "stevecube_UP.bmp");
96                cam->yaw(Ogre::Degree(90));
97            mWindow->writeContentsToFile("MySky_UP.bmp");
98            }
99            else if(stopper == 6){
100                cam->yaw(Ogre::Degree(-90));
101            mWindow->writeContentsToFile("MySky_DN.bmp");
102            }
103         
104            stopper+=1;
105            if(stopper >= 7)
106            stopper = 1;
107            */
108        }
109}
Note: See TracBrowser for help on using the repository browser.