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

colourtree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     ColourTree
00004 * Filename:  src/colourtree.h
00005 * Generated: February 26, 2004 @ 21:00:36
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 __COLOURTREE_H__
00013 #define __COLOURTREE_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 "doubleparam.h"
00027 #include "floatparam.h"
00028 
00029 
00030 
00035 class ColourTree : public CmdTreeNode
00036 {
00037 public:
00038     ColourTree()
00039         : CmdTreeNode( "Colour", new QPtrList<CmdTreeNode> )
00040     {
00041 
00042         // Trees
00043 
00044         // Commands
00045         mySubTree->append( new CmdTreeNode( "glColor3d", NULL, cmd_glColor3d, 
00046                             new SuperPtrList<CmdParam>( 3,
00047                                 new DoubleParam( "red", "1", "GLdouble" ), 
00048                                 new DoubleParam( "green", "1", "GLdouble" ), 
00049                                 new DoubleParam( "blue", "1", "GLdouble" ) ) ) );
00050         mySubTree->append( new CmdTreeNode( "glColor3f", NULL, cmd_glColor3f, 
00051                             new SuperPtrList<CmdParam>( 3,
00052                                 new FloatParam( "red", "1", "GLfloat" ), 
00053                                 new FloatParam( "green", "1", "GLfloat" ), 
00054                                 new FloatParam( "blue", "1", "GLfloat" ) ) ) );
00055         mySubTree->append( new CmdTreeNode( "glColor4d", NULL, cmd_glColor4d, 
00056                             new SuperPtrList<CmdParam>( 4,
00057                                 new DoubleParam( "red", "1", "GLdouble" ), 
00058                                 new DoubleParam( "green", "1", "GLdouble" ), 
00059                                 new DoubleParam( "blue", "1", "GLdouble" ), 
00060                                 new DoubleParam( "alpha", "1", "GLdouble" ) ) ) );
00061         mySubTree->append( new CmdTreeNode( "glColor4f", NULL, cmd_glColor4f, 
00062                             new SuperPtrList<CmdParam>( 4,
00063                                 new FloatParam( "red", "1", "GLfloat" ), 
00064                                 new FloatParam( "green", "1", "GLfloat" ), 
00065                                 new FloatParam( "blue", "1", "GLfloat" ), 
00066                                 new FloatParam( "alpha", "1", "GLfloat" ) ) ) );
00067     }
00068 
00069     // Note: In the unlikely (but serious) event that too few elements exist in
00070     //       the list of strings that is passed, the QStringList class will
00071     //       catch and handle the case as appropiate.
00072 
00073     static void cmd_glColor3d( const QStringList& p ) {
00074         glColor3d( p[0].toDouble(), p[1].toDouble(), p[2].toDouble() );
00075     }
00076     static void cmd_glColor3f( const QStringList& p ) {
00077         glColor3f( p[0].toFloat(), p[1].toFloat(), p[2].toFloat() );
00078     }
00079     static void cmd_glColor4d( const QStringList& p ) {
00080         glColor4d( p[0].toDouble(), p[1].toDouble(), p[2].toDouble(), p[3].toDouble() );
00081     }
00082     static void cmd_glColor4f( const QStringList& p ) {
00083         glColor4f( p[0].toFloat(), p[1].toFloat(), p[2].toFloat(), p[3].toFloat() );
00084     }
00085 
00086 private:
00087 
00088 };
00089 
00090 
00091 #endif // __COLOURTREE_H__

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