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

glscene.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  File:    glscene.h
00004  Created: by Aidan Lane, January  26, 2003
00005  Updated: by Aidan Lane, February 19, 2004
00006  
00007  This file is part of Glitch
00008  Copyright (C) 2003-2004  Monash University, Clayton Campus, Australia
00009  Created by Aidan Lane, under the supervision of Jon McCormack.
00010  
00011  This program was developed to aid the students studying the CSE3313
00012  Computer Graphics course at Monash University.
00013  
00014  This software may contain portions that are copyright (C) 1993,
00015  Silicon Graphics, Inc. All Rights Reserved.
00016  
00017  Glitch is free software; you can redistribute it and/or modify
00018  it under the terms of the GNU General Public License as published by
00019  the Free Software Foundation, version 2.
00020  
00021  Glitch is distributed in the hope that it will be useful,
00022  but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024  GNU General Public License for more details.
00025  
00026  You should have received a copy of the GNU General Public License
00027  along with this program; if not, write to the Free Software
00028  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00029 
00030 *****************************************************************************/
00031 
00032 #ifndef __GLSCENE_H__
00033 #define __GLSCENE_H__
00034 
00035 
00036 #include "cmdinstance.h"
00037 
00038 
00050 class GLScene
00051 {
00052 public:
00053     GLScene();
00054 
00055     void setInitCmds( QPtrList<CmdInstance>* cmds ) { initCmds = cmds; }
00056     void setDisplayCmds( QPtrList<CmdInstance>* cmds ) { displayCmds = cmds; }
00057 
00058     void execInitCmds( bool disableProjectionMods = false,
00059                        bool disableViewports = false,
00060                        bool origStateAsIdentity = false) const;
00061     void execDisplayCmds( bool disableProjectionMods = false,
00062                           bool disableViewports = false,
00063                           bool origStateAsIdentity = false) const;
00064 
00065     // The following are used for stepping through commands - like a debug mode
00066     // This is the number of the end/last display command to process.
00067     // Note: the last command processed will be |displayCmds|-1
00068     //       if stepModePos> |displayCmds|-1
00069     void setStepModeEnabled( bool enable ) { stepMode = enable; }
00070     bool stepModeIsEnabled() const { return stepMode; }
00071     void setStepModePos( uint pos ) { stepModePos = pos; }
00072     uint getStepModePos() const { return stepModePos; }
00073 
00074     bool autoGLEndEnabled() const { return autoGLEnd; }
00075     void setAutoGLEndEnabled( bool enable );
00076 
00077 private:
00078     void execCmdIntanceList( QPtrList<CmdInstance>* cmdInstances,
00079         bool useStepper, bool origStateAsIdentity,
00080         bool disableProjectionMods, bool disableViewports ) const;
00081 
00082     QPtrList<CmdInstance>* initCmds;
00083     QPtrList<CmdInstance>* displayCmds;
00084 
00085     bool stepMode;
00086     uint stepModePos;   // the number of the end/last display command to process
00087 
00088     bool autoGLEnd;
00089 };
00090 
00091 
00092 #endif // __GLSCENE_H__

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