ModelAvatar Class Reference

Model avatar. More...

#include <model_avatar.h>

Inheritance diagram for ModelAvatar:

Avatar TimeUpdateable GraphicalNode Templates::Observer< Camera >

List of all members.

Public Member Functions

 ModelAvatar ()
 Default constructor.
virtual ~ModelAvatar ()
 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 model avatar states. More...

Private Member Functions

 ModelAvatar (const ModelAvatar &)
ModelAvataroperator= (const ModelAvatar &)

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

Model avatar.

Member Enumeration Documentation

enum ModelAvatar::State [private]

Enumeration of model 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

ModelAvatar::ModelAvatar ( const ModelAvatar  )  [private]

ModelAvatar::ModelAvatar (  ) 

Default constructor.

virtual ModelAvatar::~ModelAvatar (  )  [virtual]

Destructor.


Member Function Documentation

ModelAvatar& ModelAvatar::operator= ( const ModelAvatar  )  [private]

virtual void ModelAvatar::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 ModelAvatar::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 ModelAvatar::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 ModelAvatar::INITIAL_HAMMER_ROT [static, private]

Initial rotation of the bubble hammer.

SoRotationXYZ* ModelAvatar::_rotX [private]

Rotation in the X axis.

SoRotationXYZ* ModelAvatar::_rotY [private]

Rotation in the Y axis.

SoElapsedTime* ModelAvatar::_hammerTimer [private]

The timer used for hammer movement.

SoSFFloat* ModelAvatar::_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