#include <snowman_avatar.h>
Public Member Functions | |
| SnowmanAvatar () | |
| Default constructor. | |
| virtual | ~SnowmanAvatar () |
| Destructor. | |
| virtual void | timeUpdate (float dt) |
| Timer value change event occured. | |
| virtual void | update (Camera *subject) |
| Observable object changed its state. | |
| virtual void | fire (Templates::CallableBack< Avatar > *fireDone) |
| The method that starts the avatar bubble-firing sequence. | |
Private Types | |
| enum | State { STOPPED, PREFIRE, POSTFIRE } |
| Enumeration of snowman avatar states. More... | |
Private Member Functions | |
| SnowmanAvatar (const SnowmanAvatar &) | |
| SnowmanAvatar & | operator= (const SnowmanAvatar &) |
Private Attributes | |
| SoRotationXYZ * | _rotX |
| Rotation in the X axis. | |
| SoRotationXYZ * | _rotY |
| Rotation in the Y axis. | |
| SoElapsedTime * | _hammerTimer |
| The timer used for hammer movement. | |
| SoSFFloat * | _timerTimeOut |
| The output time of the _hammerTimer. | |
| State | _state |
| The state of the avatar. | |
| Templates::CallableBack< Avatar > * | _fireDone |
Static Private Attributes | |
| static const float | INITIAL_HAMMER_ROT |
| Initial rotation of the bubble hammer. | |
enum SnowmanAvatar::State [private] |
| SnowmanAvatar::SnowmanAvatar | ( | const SnowmanAvatar & | ) | [private] |
| SnowmanAvatar::SnowmanAvatar | ( | ) |
Default constructor.
| virtual SnowmanAvatar::~SnowmanAvatar | ( | ) | [virtual] |
Destructor.
| SnowmanAvatar& SnowmanAvatar::operator= | ( | const SnowmanAvatar & | ) | [private] |
| virtual void SnowmanAvatar::timeUpdate | ( | float | dt | ) | [virtual] |
Timer value change event occured.
This method is called on each timer value change.
| [in] | dt | Time difference between the last call (delta). |
Implements TimeUpdateable.
| virtual void SnowmanAvatar::update | ( | Camera * | subject | ) | [virtual] |
Observable object changed its state.
| [in] | subject | Observable object. |
Implements Templates::Observer< Camera >.
| virtual void SnowmanAvatar::fire | ( | Templates::CallableBack< Avatar > * | fireDone | ) | [virtual] |
The method that starts the avatar bubble-firing sequence.
This method starts the avatar bubble-firing sequence. When it is done, it calls the fireDone "action performed" method.
| [in] | fireDone | Object on which the "action performed" method should be called when the bubble-firing sequence is completed |
Implements Avatar.
const float SnowmanAvatar::INITIAL_HAMMER_ROT [static, private] |
Initial rotation of the bubble hammer.
SoRotationXYZ* SnowmanAvatar::_rotX [private] |
Rotation in the X axis.
SoRotationXYZ* SnowmanAvatar::_rotY [private] |
Rotation in the Y axis.
SoElapsedTime* SnowmanAvatar::_hammerTimer [private] |
The timer used for hammer movement.
SoSFFloat* SnowmanAvatar::_timerTimeOut [private] |
The output time of the _hammerTimer.
State SnowmanAvatar::_state [private] |
The state of the avatar.
Templates::CallableBack<Avatar>* SnowmanAvatar::_fireDone [private] |
Object on which the "action performed" method should be called when the bubble-firing sequence is completed
1.5.6