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

Paddle.H

Go to the documentation of this file.
00001 /**************************************************************
00002  *  Name: Sascha Becker (sab)
00003  *  File: Paddle.H
00004  *  Asgn: cavewriting
00005  *  Date: Sat Jan 22 15:26:32 EST 2005
00006  **************************************************************/
00007 
00008 #ifndef Paddle_Header
00009 #define Paddle_Header
00010 
00011 #include <DrawObj.H>
00012 #include <IS3D.H>
00013 #include "Story.H"
00014 #include "NiceText.H"
00015 
00016 namespace cavewriting { 
00017 
00018 #define PADDLE Paddle::instance()
00019 
00020 class Paddle {
00021 
00022 public:
00023   static Paddle* instance() { return _instance; }
00024 
00025 
00026   Paddle(Story * story);
00027   virtual ~Paddle();
00028 
00029   virtual void trackerMove(EventRef e);
00030   Vector3 getPosition();
00031   double radius(); 
00032   void show();
00033   void hide();
00034 
00035   static bool shouldBounce(NiceTextRef niceText);
00036   static void startBounce(Array<Word*> &words);
00037 
00038   static void enableBounce(bool enable); 
00039   static void bounceFragment(Word* word, int emptySpotIndex, Section* section);
00040 
00041 protected:
00042   Story* _story;
00043 
00044   FsaRef            _fsa;
00045   Array<DrawObjRef> _objs;
00046   CoordinateFrame   _frame;
00047   double _radius;
00048   bool _moveDrawObjs; 
00049   bool _bounceEnabled; 
00050 private:
00051   static Paddle* _instance; 
00052 
00053 };
00054 
00055 }
00056 
00057 #endif

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