00001 /*************************************************************************** 00002 gldisplacementmap.h - description 00003 ------------------- 00004 begin : Fri Jan 30 2004 00005 copyright : (C) 2004 by Jacques Gasselin de Richebourg 00006 email : jacquesgasselin@hotmail.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU Lesser General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00019 * Lesser General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU Lesser General Public * 00022 * License along with this library; if not, write to the Free Software * 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00024 * * 00025 ***************************************************************************/ 00026 00027 00028 #ifndef GLDISPLACEMENTMAP_H 00029 #define GLDISPLACEMENTMAP_H 00030 00031 00032 #include "glscene.h" 00033 #include "glgeometricobject.h" 00034 #include "glsurface.h" 00035 #include "glimage.h" 00036 #include "smltgl.h" 00045 namespace GLScene 00046 { 00047 class GLDisplacementMap: public GLSceneObject, public GLFieldHolder 00048 { 00049 //these are derived from the image 00050 GLfloat* map; 00051 GLuint mapWidth; 00052 GLuint mapHeight; 00053 00054 public: 00055 SML_TAG(displacementmap) 00056 00057 static std::string refvalName; 00058 static std::string heightName; 00059 static std::string imageName; 00060 00061 GLField<GLuint> referenceValue; 00062 GLField<GLfloat> height; 00063 GLField<GLImage> image; 00064 00065 GLDisplacementMap(); 00066 ~GLDisplacementMap(); 00067 00068 void displaceVertecies(const GLfloat u, const GLuint nOfV, GLfloat* const verts3) const {}; 00069 00070 }; 00071 00072 } 00073 #endif