SnowmanAvatar Class Reference

Snowman avatar. More...

#include <snowman_avatar.h>

Inheritance diagram for SnowmanAvatar:

Avatar TimeUpdateable GraphicalNode Templates::Observer< Camera >

List of all members.

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 &)
SnowmanAvataroperator= (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.


Detailed Description

Snowman avatar.

Member Enumeration Documentation

enum SnowmanAvatar::State [private]

Enumeration of snowman avatar states.

Enumerator:
STOPPED 
PREFIRE  the hammer is stopped
POSTFIRE  the hammer is moving, but has not hit the bubble yet

the hammer is moving and has already hit the bubble


Constructor & Destructor Documentation

SnowmanAvatar::SnowmanAvatar ( const SnowmanAvatar  )  [private]

SnowmanAvatar::SnowmanAvatar (  ) 

Default constructor.

virtual SnowmanAvatar::~SnowmanAvatar (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
[in] dt Time difference between the last call (delta).

Implements TimeUpdateable.

virtual void SnowmanAvatar::update ( Camera subject  )  [virtual]

Observable object changed its state.

Parameters:
[in] subject Observable object.
This method is a reaction to the observable object (arg) state change.

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.

Parameters:
[in] fireDone Object on which the "action performed" method should be called when the bubble-firing sequence is completed

Implements Avatar.


Member Data Documentation

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.

The state of the avatar.

Object on which the "action performed" method should be called when the bubble-firing sequence is completed


The documentation for this class was generated from the following file:

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