Public Member Functions | Private Member Functions | Private Attributes

control::ReplayPlayer Class Reference

Replay animation of an Aircraft (play mode implementation of Replay class). More...

#include <_src_control_replay_player.hh>

List of all members.

Public Member Functions

 ReplayPlayer (shptr< Aircraft > aircraft, const Milliseconds freq, const Command::ExecuteMode commandExecuteMode)
 ~ReplayPlayer ()
bool Start (void)
void Stop (void)
bool IfPlaying (void)
bool Load (const string &filename)
void UseRecording (shptr< ReplayRecorder > recorder)

Private Member Functions

void Register (void)
void Unregister (void)
void Tick (const Milliseconds elapsedTime)
void TryInterpolatingPositions (void)
void TryInterpolatingQuaternions (void)
fp ComputeInterpolationFraction (const ReplayPath::Step &prevStep, const ReplayPath::Step &nextStep)
void DisableJoystickIfPlayer (void)
void RestoreJoystickIfPlayer (void)

Private Attributes

CLASS_CONST Milliseconds::Int INVALID_TIME = -1
CLASS_TICK_FUNCTOR(ReplayPlayer,
mPlayer) private const
Milliseconds 
mFreq
 Timer-tick to animate replay.
const Command::ExecuteMode mCommandExecuteMode
 graphical or physical replay
bool mRegistered
 if listeners/functors are currently registered
shptr< TickFunctor > mTickFunctor
 pulse for play mode
shptr< ReplayPathmPath
 replay data consists of steps in animation path
Milliseconds mStartTime
 time when playing began
bool mPlaying
bool mJoystickEnabled
 joystick might be disabled during replay

Detailed Description

Replay animation of an Aircraft (play mode implementation of Replay class).


Constructor & Destructor Documentation

control::ReplayPlayer::ReplayPlayer ( shptr< Aircraft >  aircraft,
const Milliseconds  freq,
const Command::ExecuteMode  commandExecuteMode 
)
control::ReplayPlayer::~ReplayPlayer (  ) 

Member Function Documentation

fp control::ReplayPlayer::ComputeInterpolationFraction ( const ReplayPath::Step prevStep,
const ReplayPath::Step nextStep 
) [private]

Compute fraction to be passed to a math::Interpolate() function.

void control::ReplayPlayer::DisableJoystickIfPlayer ( void   )  [private]

If Replay is controlling the player, disable joystick input to prevent interference.

bool control::ReplayPlayer::IfPlaying ( void   ) 
Returns:
True if playing.
bool control::ReplayPlayer::Load ( const string &  filename  ) 

Load replay data from a file. THROWS EXCEPTION.

void control::ReplayPlayer::Register ( void   )  [private]

Register listeners/functors. Either is safe to call at anytime or be unmatched.

void control::ReplayPlayer::RestoreJoystickIfPlayer ( void   )  [private]
bool control::ReplayPlayer::Start ( void   ) 

Start replaying.

void control::ReplayPlayer::Stop ( void   ) 

Stop playing.

void control::ReplayPlayer::Tick ( const Milliseconds  elapsedTime  )  [private]
void control::ReplayPlayer::TryInterpolatingPositions ( void   )  [private]

Interpolate between two positions.

void control::ReplayPlayer::TryInterpolatingQuaternions ( void   )  [private]

Interpolate between two rotations.

void control::ReplayPlayer::Unregister ( void   )  [private]
void control::ReplayPlayer::UseRecording ( shptr< ReplayRecorder recorder  ) 

Member Data Documentation

CLASS_CONST Milliseconds::Int control::ReplayPlayer::INVALID_TIME = -1 [private]

graphical or physical replay

CLASS_TICK_FUNCTOR ( ReplayPlayer, mPlayer ) private const Milliseconds control::ReplayPlayer::mFreq [private]

Timer-tick to animate replay.

< Aircraft to replay freq of timer-tick

joystick might be disabled during replay

replay data consists of steps in animation path

if listeners/functors are currently registered

Milliseconds control::ReplayPlayer::mStartTime [private]

time when playing began

shptr<TickFunctor> control::ReplayPlayer::mTickFunctor [private]

pulse for play mode


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11