snowman_avatar.h

Go to the documentation of this file.
00001 
00015 #ifndef _SNOWMAN_AVATAR_H_
00016 #define _SNOWMAN_AVATAR_H_
00017 
00018 #include <Inventor/engines/SoElapsedTime.h>
00019 
00020 #include "avatar.h"
00021 
00025 class SnowmanAvatar: public Avatar
00026 {
00027         private:
00028 
00030                 enum State
00031                 {
00032                         STOPPED,   
00033                         PREFIRE,   
00034                         POSTFIRE   
00035                 };
00036 
00038                 static const float INITIAL_HAMMER_ROT;
00039 
00041                 SoRotationXYZ *_rotX;
00042 
00044                 SoRotationXYZ *_rotY;
00045 
00047                 SoElapsedTime* _hammerTimer;
00048 
00050                 SoSFFloat* _timerTimeOut;
00051 
00053                 State _state;
00054 
00057                 Templates::CallableBack<Avatar>* _fireDone;
00058 
00059         private:
00060 
00061                 // Disable copy constructor and assignment operator
00062                 SnowmanAvatar(const SnowmanAvatar &);
00063                 SnowmanAvatar & operator=(const SnowmanAvatar &);
00064 
00065         public:
00066 
00070                 SnowmanAvatar();
00071 
00075                 virtual ~SnowmanAvatar();
00076 
00077                 // Override
00078                 virtual void timeUpdate(float dt);
00079 
00080                 // Override
00081                 virtual void update(Camera* subject);
00082 
00083                 // Override
00084                 virtual void fire(Templates::CallableBack<Avatar>* fireDone);
00085 };
00086 
00087 #endif

Generated on Sat Dec 20 19:21:24 2008 for PGR2008 by  doxygen 1.5.6