Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations

Engine.h

Aller à la documentation de ce fichier.
00001 /*=========================================================================
00002 UberSim Source Code Release
00003 -------------------------------------------------------------------------
00004 Copyright (C) 2002 Manuela Veloso, Brett Browning, Mike Bowling,
00005                    James Bruce; {mmv, brettb, mhb, jbruce}@cs.cmu.edu
00006                    Erick Tryzelaar {erickt}@andrew.cmu.edu
00007 School of Computer Science, Carnegie Mellon University
00008 -------------------------------------------------------------------------
00009 This software is distributed under the GNU General Public License,
00010 version 2.  If you do not have a copy of this licence, visit
00011 www.gnu.org, or write: Free Software Foundation, 59 Temple Place,
00012 Suite 330 Boston, MA 02111-1307 USA.  This program is distributed
00013 in the hope that it will be useful, but WITHOUT ANY WARRANTY,
00014 including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00015 -------------------------------------------------------------------------*/
00016 
00017 #ifndef __SIM_ENGINE_H__
00018 #define __SIM_ENGINE_H__
00019 
00020 #include "Math.h"
00026 class Node;
00027 
00028 class Engine
00029 {
00030     public:
00031         static Engine* getInstance ();
00032 
00033     public:
00034         ~Engine ();
00035 
00036     public:
00037         void initialize ();
00038         void shutdown   ();
00039 
00040     public:
00041         Node* getRoot ();
00042         
00043         bool getIsPaused        ();
00044         bool getIsTakingOneStep ();
00045         bool getIsSkippingFrame ();
00046         
00047         Real         getStartTime   ();
00048         Real         getCurrentTime ();
00049         Real         getDeltaTime   ();
00050         unsigned int getFrameCount  ();
00051         Real         getFps         ();
00052         Real         getTargetFps   ();
00053 
00054         void setIsPaused        (bool isPaused);
00055         void setIsTakingOneStep (bool isTakingOneStep);
00056         void setTargetFps       (Real targetFps);
00057 
00058     public:
00059         void beginFrame ();
00060         void frame      ();
00061         void endFrame   ();
00062 
00063     protected:
00064         Engine ();
00065 
00066     protected:  
00067         bool isInitialized;
00068         bool isShutdown;
00069 
00070         Node* root;
00071     
00072         bool isPaused;
00073         bool isTakingOneStep;
00074         bool isSkippingFrame;
00075 
00076         unsigned int frameCount;
00077         Real         startTime;
00078         Real         currentTime;
00079         Real         previousTime;
00080         Real         deltaTime;
00081         Real         targetFps;
00082         Real         fps;
00083 };
00084 
00085 #endif

Généré le Mon Mar 1 01:29:41 2004 par doxygen 1.3.3