Page principale | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe

C:/Projects/ngn/include/skybox.h

00001 /***************************************************************************
00002  *            skybox.h
00003  *
00004  *  Sat May  1 13:07:53 2004
00005  *  Copyright  2004  tite
00006  *  thierry.schartz@bluebottle.com
00007  ****************************************************************************/
00008 
00009 /*
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00023  */
00024 
00025  #ifndef _SKYBOX_H
00026  #define _SKYBOX_H
00027 
00028  #ifdef WIN32
00029  #include <windows.h>
00030  #endif
00031 
00032 
00033 #include "box.h"
00034 #include <string>
00035 
00036 #define NGN_FACE_BACK   0
00037 #define NGN_FACE_FRONT  1
00038 #define NGN_FACE_LEFT   2
00039 #define NGN_FACE_RIGHT  3
00040 #define NGN_FACE_TOP    4
00041 #define NGN_FACE_BOTTOM 5
00042 #define NGN_FACE_ALL    6       // use same texture for all sides
00043 
00044 
00045  namespace ngn {
00046 
00047          namespace core {
00048                 class Texture;
00049          }
00050 
00054                  class NGN_API Skybox : public Box
00055                  {
00056                  public:
00058                          Skybox();
00060                          Skybox( float width, float height, float length );
00062                          Skybox( const Vector3df min, const Vector3df& max );
00064                          Skybox( const Skybox& other );
00065                          //destructor
00066                          virtual ~Skybox();
00067                          
00069                          void setEnvironmentMap( const std::string& path );
00071                          void setFaceTexture( unsigned int face, const std::string& file );
00073                          virtual void render( const Camera& cam );
00074 
00075 
00076                  protected:
00078                         virtual void computeCentre();
00079 
00080                  private:
00081                          std::string m_envmappath;      // path to the environment map files
00082                          unsigned int *m_texid;
00083                          Texture *m_tex;
00084                          bool m_use_envmap;
00085                          bool m_use_face_by_face;
00086 
00087                  };
00088 
00089 
00090 
00091 
00092  }//ngn
00093 
00094 #endif /* _SKYBOX_H */
00095 
00096                         

Généré le Fri Nov 19 14:20:29 2004 pour NGN par  doxygen 1.3.9.1