Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

AnimMgr.H

Go to the documentation of this file.
00001 
00009 #ifndef ANIMMGR_H
00010 #define ANIMMGR_H
00011 
00012 // Gluebase includes
00013 #define OUTSIDE_GLUE_CORE
00014 #include <std/hash.H>
00015 #include <std/strings.H>
00016 #include <mlib/points.H>
00017 
00018 #include "AnimObj.H"
00019 
00020 namespace InSpace {
00021 
00022 class ANIMMGR
00023 {
00024  public:
00025 
00026   // register an object to get its animate method called each frame
00027   static void registerObj(AnimObj* o);
00028   // remove an object from the animate list for subsequent frames
00029   static void removeObj(AnimObj *o);
00030 
00031   static int numObjects() { 
00032     return _objects.num(); 
00033   }
00034 
00035   static AnimObj* getObject(int num) {
00036     if (num < _objects.num())
00037       return _objects[num];
00038     else
00039       return NULL;
00040   }
00041 
00042   static void animateObjs();
00043 
00044   static void update(double time);
00045 
00046  protected:
00047 
00048   static ARRAY<AnimObj*> _objects;
00049   static ARRAY<AnimObj*> _removeQueue;
00050   static double _lastFrameTime;
00051   static double the_time;
00052   static double start_time;
00053 };
00054 
00055 }
00056 
00057 #endif

Generated on Thu Jul 8 15:19:28 2004 for inspace by doxygen 1.3.4