| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /********************************************************************** 00002 VRS - The Virtual Rendering System 00003 Copyright (C) 2001 Computer Graphics Systems Group at the 00004 Hasso-Plattner-Institute, Potsdam, Germany. 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 This library is distributed in the hope that it will be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 See the GNU Lesser General Public License for more details. 00013 You should have received a copy of the GNU Lesser+ General Public 00014 License along with this library; if not, write to the FreeSoftware 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00016 **********************************************************************/ 00017 // $Id: texgengl.h 6014 2007-08-09 07:51:16Z Konstantin_Baumann $ 00018 // $Date: 2007-08-09 09:51:16 +0200 (Thu, 09 Aug 2007) $ 00019 // $Revision: 6014 $ 00020 // $State$ 00021 // $Author: Konstantin_Baumann $ 00022 // 00023 // $Log$ 00024 // Revision 1.16 2005/06/15 16:30:02 baumann 00025 // added methods SharedObj::isEqual() and SharedObj::IsEqual() (define operator==() in derived classes for a real implementaton) 00026 // 00027 // Revision 1.15 2005/02/10 17:25:13 baumann 00028 // additional ctor added 00029 // 00030 // Revision 1.14 2005/01/03 01:43:10 klimetschek 00031 // - modified win32 project layout, splitted vrs.vcproj into vrs_container, vrs_core, vrs_sg, vrs_image, vrs_opengl and vrs_io 00032 // - removed vrs.vcproj 00033 // minor things: 00034 // - added all glutexamples to vrs4glut.sln 00035 // - fixed some problems in glutexamples 00036 // - removed all project references from all VS projects (using solution wide project dependencies instead) 00037 // 00038 // Revision 1.13 2004/11/03 14:45:07 saar 00039 // Class comment changed (Doxygen style) 00040 // 00041 // Revision 1.12 2004/03/29 15:44:30 kirsch 00042 // forward included staticarray 00043 // 00044 // Revision 1.11 2004/03/12 16:28:41 baumann 00045 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00046 // 00047 // Revision 1.10 2004/01/19 11:43:58 baumann 00048 // serialization mechanism improved 00049 // 00050 // Revision 1.9 2004/01/19 07:28:03 baumann 00051 // serialization mechanism improved 00052 // 00053 // Revision 1.8 2002/10/29 10:32:53 baumann 00054 // macros VRS_CLASSNAME_* and VRS_IMPL_TYPEINFO_* removed 00055 // 00056 // Revision 1.7 2002/04/26 08:19:16 kirsch 00057 // texgengl: use staticarray instead of array 00058 // 00059 // Revision 1.6 2002/03/04 12:00:20 kersting 00060 // directory structure changes 00061 // 00062 // Revision 1.8 2002/03/03 21:44:26 kosta 00063 // VRS_TYPEINFO-macro rewritten 00064 // 00065 // Revision 1.7 2002/02/19 10:34:19 kosta 00066 // undone all changes since 2002-02-15 00067 // 00068 // Revision 1.4 2002/02/05 07:48:26 kosta 00069 // new persistency macros: 00070 // VRS_SERIALIZABLE(CLASS_NAME); 00071 // VRS_SERIALIZABLE_ABSTRACT_CLASS(CLASS_NAME); 00072 // VRS_SERIALIZABLE_NO_SO_CLASS(CLASS_NAME) 00073 // 00074 // Revision 1.3 2002/02/04 13:07:19 kosta 00075 // VRS_SERIALIZABLE macros completely rewritten 00076 // 00077 // Revision 1.2 2002/01/15 16:25:55 kosta 00078 // macros rewritten for a better namespace support 00079 // 00080 // Revision 1.1 2002/01/08 16:02:49 kosta 00081 // dir structure for textures changed 00082 // 00083 // Revision 1.4 2001/11/13 16:36:31 kirsch 00084 // changed line feed to unix style (removed control-M) 00085 // 00086 // Revision 1.3 2001/07/22 19:43:59 kosta 00087 // support for reflection-map and normal-map added 00088 // 00089 // Revision 1.2 2001/07/02 10:14:30 kersting 00090 // changes due to enum definition 00091 // 00092 // Revision 1.1.1.1 2001/06/08 08:09:21 kirsch 00093 // imported alpha-version by olli 00094 // 00095 00096 #ifndef VRS_OPENGL_TEXTURE_TEXGENGL_H 00097 #define VRS_OPENGL_TEXTURE_TEXGENGL_H 00098 00099 #include <vrs/matrix.h> 00100 #include <vrs/monoattribute.h> 00101 00102 namespace VRS { 00103 00104 template<typename T> class StaticArray; 00105 00107 class VRS_CORE_API TexGenGL : public MonoAttribute { 00108 public: 00109 enum GenMode { Off, Object, Eye, EyeLocal, Spherical, ReflectionMap, NormalMap }; 00110 VRS_SERIALIZABLE_CLASS_ENUM(GenMode); 00111 00112 TexGenGL( 00113 GenMode genMode = TexGenGL::Off, 00114 double sPlane0 = 0, double sPlane1 = 0, double sPlane2 = 0, double sPlane3 = 0, 00115 double tPlane0 = 0, double tPlane1 = 0, double tPlane2 = 0, double tPlane3 = 0, 00116 double rPlane0 = 0, double rPlane1 = 0, double rPlane2 = 0, double rPlane3 = 0, 00117 double qPlane0 = 0, double qPlane1 = 0, double qPlane2 = 0, double qPlane3 = 0 00118 ); 00119 TexGenGL( 00120 GenMode genMode, 00121 const VRS::Matrix& mat 00122 ); 00123 TexGenGL( 00124 GenMode genMode, 00125 StaticArray<double>* sPlane, 00126 StaticArray<double>* tPlane = 0, 00127 StaticArray<double>* rPlane = 0, 00128 StaticArray<double>* qPlane = 0 00129 ); 00136 bool operator==(const TexGenGL& other) const; 00137 00138 GenMode getGenMode() const; 00139 void setGenMode(GenMode genMode); 00141 00142 StaticArray<double>* getSPlane() const; 00143 void setSPlane(StaticArray<double>* sPlane); 00144 void setSPlane(double sPlane0, double sPlane1, double sPlane2, double sPlane3); 00145 StaticArray<double>* getTPlane() const; 00146 void setTPlane(StaticArray<double>* tPlane); 00147 void setTPlane(double tPlane0, double tPlane1, double tPlane2, double tPlane3); 00148 StaticArray<double>* getRPlane() const; 00149 void setRPlane(StaticArray<double>* rPlane); 00150 void setRPlane(double rPlane0, double rPlane1, double rPlane2, double rPlane3); 00151 StaticArray<double>* getQPlane() const; 00152 void setQPlane(StaticArray<double>* qPlane); 00153 void setQPlane(double qPlane0, double qPlane1, double qPlane2, double qPlane3); 00155 00156 VRS_TYPEINFO(TexGenGL, MonoAttribute); 00157 VRS_SERIALIZABLE(TexGenGL); 00158 00159 private: 00160 GenMode mode_; 00161 SO<StaticArray<double> > sPlane_; 00162 SO<StaticArray<double> > tPlane_; 00163 SO<StaticArray<double> > rPlane_; 00164 SO<StaticArray<double> > qPlane_; 00165 }; 00166 00167 } // namespace VRS 00168 00169 #endif // VRS_OPENGL_TEXTURE_TEXGENGL_H