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

Scene.H

Go to the documentation of this file.
00001 /**************************************************************
00002  *  Name: Sascha Becker (sab)
00003  *  File: Scene.H
00004  *  Asgn: cavewriting
00005  *  Date: Sat Jan  1 20:11:00 EST 2005
00006  **************************************************************/
00007 
00008 #ifndef Scene_Header
00009 #define Scene_Header
00010 
00011 
00012 #include <G3DAll.h>
00013 #include <string>
00014 #include <XercesXMLUtil.H>
00015 #include "Section.H"
00016 #include "Story.H"
00017 
00018 using namespace std;
00019 
00020 namespace cavewriting {
00021 
00052 class Scene  : public IS3D::AnimObj {
00053 
00054 public:
00055 
00056   Scene(Story* story, xercesc::DOMNode* node, int id);
00057   virtual ~Scene();
00058 
00059   virtual void start(); 
00060 
00061   const double getStartTime()       { return _startTime; }
00062   void setStartTime(double time) {_startTime = time; }
00063   const double getDuration()        { return _duration; }
00064   const bool   getPaused()          { return _paused; }
00065   const string& getName()           { return _name; } 
00066 
00067   virtual void animate() {}
00068 
00069   static Scene* fromXML(Story* story, xercesc::DOMNode* node, int id);
00070   Array<Section*> getSections() { return _sections; }
00071 
00072   void playSound(); 
00073 
00074 protected:
00075   void addFragment(xercesc::DOMNode* node, Story* story); 
00076 
00077   string _name; 
00078   bool _paused; 
00079   double _startTime;
00080   double _duration; 
00081   int _id; 
00082   Array<Section*> _sections;
00083 
00084   // name of sound to play -- naming scheme same as Word.H
00085   string _soundName;
00086   // location of sound to play 
00087   Vector3 _soundLocation; 
00088   // ignored
00089   double _soundTime; 
00090 
00091   void checkAndDoGrab(); 
00093   double _lastGrabTime;
00095   double _grabPeriod; 
00097   bool _doGrabs;
00098   
00099 private:
00100 
00101 };
00102 
00103 }
00104 
00105 #endif

Generated on Sun Apr 17 13:34:27 2005 for cavewriting by  doxygen 1.4.0