Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

fogtree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     FogTree
00004 * Filename:  src/fogtree.h
00005 * Generated: February 26, 2004 @ 21:00:37
00006 *        by: GENTREE - Generates C++ command tree header files for GLITCH.
00007 *
00008 * WARNING! All changes made in this file will be lost!
00009 *
00010 *******************************************************************************/
00011 
00012 #ifndef __FOGTREE_H__
00013 #define __FOGTREE_H__
00014 
00015 
00016 #include <qgl.h>
00017 #include <qptrlist.h>
00018 #include <qstring.h>
00019 #include <qstringlist.h>
00020 
00021 #include "cmdtreenode.h"
00022 #include "cmdparam.h"
00023 #include "superptrlist.h"
00024 #include "supervaluelist.h"
00025 
00026 #include "enumparam.h"
00027 #include "intparam.h"
00028 #include "floatparam.h"
00029 #include "arrayparam.h"
00030 
00031 
00032 
00037 class FogTree : public CmdTreeNode
00038 {
00039 public:
00040     FogTree()
00041         : CmdTreeNode( "Fog", new QPtrList<CmdTreeNode> )
00042     {
00043 
00044         // Trees
00045 
00046         // Commands
00047         mySubTree->append( new CmdTreeNode( "glFogf", NULL, cmd_glFogf, 
00048                             new SuperPtrList<CmdParam>( 2,
00049                                 new EnumParam( "pname", "2915", 
00050                                     SuperValueList<char*>( 2,
00051                                         "GL_FOG_START",
00052                                         "GL_FOG_END" ),
00053                                     SuperValueList<int>( 2,
00054                                         GL_FOG_START,
00055                                         GL_FOG_END ),
00056                                     "GLenum" ), 
00057                                 new FloatParam( "param", "0.5", "GLfloat" ) ) ) );
00058         mySubTree->append( new CmdTreeNode( "glFogi", NULL, cmd_glFogi, 
00059                             new SuperPtrList<CmdParam>( 2,
00060                                 new EnumParam( "pname", "2917", 
00061                                     SuperValueList<char*>( 3,
00062                                         "GL_FOG_START",
00063                                         "GL_FOG_END",
00064                                         "GL_FOG_MODE" ),
00065                                     SuperValueList<int>( 3,
00066                                         GL_FOG_START,
00067                                         GL_FOG_END,
00068                                         GL_FOG_MODE ),
00069                                     "GLenum" ), 
00070                                 new IntParam( "param", "9729", "GLint" ) ) ) );
00071         mySubTree->append( new CmdTreeNode( "glFogfv", NULL, cmd_glFogfv, 
00072                             new SuperPtrList<CmdParam>( 2,
00073                                 new EnumParam( "pname", "2918", 
00074                                     SuperValueList<char*>( 1,
00075                                         "GL_FOG_COLOR" ),
00076                                     SuperValueList<int>( 1,
00077                                         GL_FOG_COLOR ),
00078                                     "GLenum" ), 
00079                                 new ArrayParam( "params", "colour",
00080                                     new SuperPtrList<CmdParam>( 4,
00081                                         new FloatParam( "0", "0.7" ),
00082                                         new FloatParam( "1", "0.7" ),
00083                                         new FloatParam( "2", "0.7" ),
00084                                         new FloatParam( "3", "1" ) ),
00085                                     "GLfloat*" ) ) ) );
00086     }
00087 
00088     // Note: In the unlikely (but serious) event that too few elements exist in
00089     //       the list of strings that is passed, the QStringList class will
00090     //       catch and handle the case as appropiate.
00091 
00092     static void cmd_glFogf( const QStringList& p ) {
00093         glFogf( p[0].toInt(), p[1].toFloat() );
00094     }
00095     static void cmd_glFogi( const QStringList& p ) {
00096         glFogi( p[0].toInt(), p[1].toInt() );
00097     }
00098     static void cmd_glFogfv( const QStringList& p ) {
00099         GLfloat params[4] = { p[1].toFloat(), p[2].toFloat(), p[3].toFloat(), p[4].toFloat() };
00100         glFogfv( p[0].toInt(), params );
00101     }
00102 
00103 private:
00104 
00105 };
00106 
00107 
00108 #endif // __FOGTREE_H__

Generated on Fri Feb 27 12:01:39 2004 for Glitch by doxygen 1.3.2