00001 /************************************************************** 00002 * Name: Sascha Becker (sab) 00003 * File: PeelScene.H 00004 * Asgn: cavewriting 00005 * Date: Sat Jan 1 20:11:00 EST 2005 00006 **************************************************************/ 00007 00008 #ifndef PeelScene_Header 00009 #define PeelScene_Header 00010 00011 00012 #include <G3DAll.h> 00013 #include <string> 00014 #include <XercesXMLUtil.H> 00015 #include "Section.H" 00016 #include "Story.H" 00017 #include "Scene.H" 00018 00019 using namespace std; 00020 00021 namespace cavewriting { 00022 00086 class PeelScene : public Scene { 00087 00088 public: 00089 00090 PeelScene(Story* story, xercesc::DOMNode* node, int id); 00091 virtual ~PeelScene(); 00092 00093 virtual void start(); 00094 virtual void animate(); 00095 00096 protected: 00097 Story * _story; 00098 Word* getRandomUnpeeledWord(); 00099 Word* getRandomWeightedUnpeeledWord(); 00100 Word* getRandomUnpeeledWordFromSection(int section); 00101 bool readyToCollapse(); 00102 int _lastSectionPeeledFrom; 00103 double _lastTimePeelStarted; 00104 double _peelInterval; 00105 double _peelDuration; 00106 string _peelEffectType; 00107 int _numWordsPeeled; 00108 int _totalWords; 00109 bool _peeledAllWords; 00110 private: 00111 00112 }; 00113 00114 } 00115 00116 #endif