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

projectiontree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     ProjectionTree
00004 * Filename:  src/projectiontree.h
00005 * Generated: February 26, 2004 @ 21:00:38
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 __PROJECTIONTREE_H__
00013 #define __PROJECTIONTREE_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 
00028 
00029 
00034 class ProjectionTree : public CmdTreeNode
00035 {
00036 public:
00037     ProjectionTree()
00038         : CmdTreeNode( "Projection", new QPtrList<CmdTreeNode> )
00039     {
00040 
00041         // Trees
00042 
00043         // Commands
00044         mySubTree->append( new CmdTreeNode( "glOrtho", NULL, cmd_glOrtho, 
00045                             new SuperPtrList<CmdParam>( 6,
00046                                 new DoubleParam( "left", "-1", "GLdouble" ), 
00047                                 new DoubleParam( "right", "1", "GLdouble" ), 
00048                                 new DoubleParam( "bottom", "-1", "GLdouble" ), 
00049                                 new DoubleParam( "top", "1", "GLdouble" ), 
00050                                 new DoubleParam( "near_val", "-1", "GLdouble" ), 
00051                                 new DoubleParam( "far_val", "1", "GLdouble" ) ) ) );
00052         mySubTree->append( new CmdTreeNode( "glFrustum", NULL, cmd_glFrustum, 
00053                             new SuperPtrList<CmdParam>( 6,
00054                                 new DoubleParam( "left", "-1", "GLdouble" ), 
00055                                 new DoubleParam( "right", "1", "GLdouble" ), 
00056                                 new DoubleParam( "bottom", "-1", "GLdouble" ), 
00057                                 new DoubleParam( "top", "1", "GLdouble" ), 
00058                                 new DoubleParam( "near_val", "1", "GLdouble" ), 
00059                                 new DoubleParam( "far_val", "5", "GLdouble" ) ) ) );
00060         mySubTree->append( new CmdTreeNode( "gluOrtho2D", NULL, cmd_gluOrtho2D, 
00061                             new SuperPtrList<CmdParam>( 4,
00062                                 new DoubleParam( "left", "-1", "GLdouble" ), 
00063                                 new DoubleParam( "right", "1", "GLdouble" ), 
00064                                 new DoubleParam( "bottom", "-1", "GLdouble" ), 
00065                                 new DoubleParam( "top", "1", "GLdouble" ) ) ) );
00066         mySubTree->append( new CmdTreeNode( "gluPerspective", NULL, cmd_gluPerspective, 
00067                             new SuperPtrList<CmdParam>( 4,
00068                                 new DoubleParam( "fovy", "60", "GLdouble" ), 
00069                                 new DoubleParam( "aspect", "1", "GLdouble" ), 
00070                                 new DoubleParam( "zNear", "1", "GLdouble" ), 
00071                                 new DoubleParam( "zFar", "5", "GLdouble" ) ) ) );
00072     }
00073 
00074     // Note: In the unlikely (but serious) event that too few elements exist in
00075     //       the list of strings that is passed, the QStringList class will
00076     //       catch and handle the case as appropiate.
00077 
00078     static void cmd_glOrtho( const QStringList& p ) {
00079         glOrtho( p[0].toDouble(), p[1].toDouble(), p[2].toDouble(), p[3].toDouble(), p[4].toDouble(), p[5].toDouble() );
00080     }
00081     static void cmd_glFrustum( const QStringList& p ) {
00082         glFrustum( p[0].toDouble(), p[1].toDouble(), p[2].toDouble(), p[3].toDouble(), p[4].toDouble(), p[5].toDouble() );
00083     }
00084     static void cmd_gluOrtho2D( const QStringList& p ) {
00085         gluOrtho2D( p[0].toDouble(), p[1].toDouble(), p[2].toDouble(), p[3].toDouble() );
00086     }
00087     static void cmd_gluPerspective( const QStringList& p ) {
00088         gluPerspective( p[0].toDouble(), p[1].toDouble(), p[2].toDouble(), p[3].toDouble() );
00089     }
00090 
00091 private:
00092 
00093 };
00094 
00095 
00096 #endif // __PROJECTIONTREE_H__

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