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

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

00001 /***************************************************************************
00002  *            material.h
00003  *
00004  *  Tue Sep  7 14:32:34 2004
00005  *  Copyright  2004  thierry schartz
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 _MATERIAL_H
00026  #define _MATERIAL_H
00027 
00028  #ifdef WIN32
00029  #include <windows.h>
00030  #endif
00031 
00032 
00033 #include "texture.h"
00034 #include "color.h"
00035 
00036  namespace ngn {
00037          namespace core {
00038                  
00039                 /* material class definig properties of a surface ( texture, color, light,...)*/
00040                  class Material
00041                  {
00042                  public:
00043                          Material();
00044                          Material( const Material& other );
00045                          Material( const Texture& texture, const Colorf& color ); 
00046                          virtual ~Material();
00047 
00048                         // bind material to an object3d 
00049                          void bind();
00050                          // enable material
00051                         void enable();
00052                         // disable material
00053                         void disable();
00054 
00055                          void setTexture( const Texture& texture );
00056                          void setColor( const Colorf& color );
00057                          void setBlendMode( unsigned int src, unsigned int dest );
00058 
00059                          const Texture& getTexture() const;
00060                          const Colorf& getColor() const;
00061                          unsigned int getBlendSrc() const;
00062                          unsigned int getBlendDst() const;
00063 
00064 
00065 
00066                  private:
00067                          Colorf m_color;
00068                          Texture m_tex;
00069                          unsigned int m_blend_src;
00070                          unsigned int m_blend_dst;
00071 
00072                  };
00073 
00074 
00075 
00076          }//core
00077  }//ngn
00078 #endif /* _MATERIAL_H */

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