Replay animation of an Aircraft (play mode implementation of Replay class). More...
#include "base/module.hh"#include "base/timer.hh"#include "base/stream.hh"#include "base/stream_zlib.hh"#include "math/module.hh"#include "math/funcs.hh"#include "math/funcs_vector.hh"#include "object/module.hh"#include "object/aircraft.hh"#include "world/module.hh"#include "control/module.hh"#include "control/defs.hh"#include "control/command.hh"#include "control/joystick.hh"#include "control/replay.hh"#include "control/replay_recorder.hh"#include "control/replay_player.hh"Namespaces | |
| namespace | control |
control module (layer over lower-level input module, contains current Craft). | |
Defines | |
| #define | CONTROL_REPLAY_PLAYER_CC 1 |
| #define | TRY_INTERPOLATING(IF_HAVE_STEPS,COMMAND_CLASS, COMMAND_TYPE_NUM,STEPS_TYPEDEF, GET_STEPS,POS_OR_QUAT_CLASS, GET_POS_OR_QUAT, SET_POS_OR_QUAT) |
Replay animation of an Aircraft (play mode implementation of Replay class).
| #define CONTROL_REPLAY_PLAYER_CC 1 |
| #define TRY_INTERPOLATING | ( | IF_HAVE_STEPS, | ||
| COMMAND_CLASS, | ||||
| COMMAND_TYPE_NUM, | ||||
| STEPS_TYPEDEF, | ||||
| GET_STEPS, | ||||
| POS_OR_QUAT_CLASS, | ||||
| GET_POS_OR_QUAT, | ||||
| SET_POS_OR_QUAT | ||||
| ) |
{ \
/* If cursor is across two positions. */ \
if ( mPath->GetCursor().IF_HAVE_STEPS() ) \
{ \
ReplayPath::Cursor::STEPS_TYPEDEF steps = mPath->GetCursor().GET_STEPS(); \
ReplayPath::Step& prevStep = steps.first; \
ReplayPath::Step& nextStep = steps.second; \
\
CHECK_TYPESIG(prevStep.mCommand,TYPESIG_COMMAND); \
CHECK_TYPESIG(nextStep.mCommand,TYPESIG_COMMAND); \
ASSERT( prevStep.mCommand->GetType() == COMMAND_TYPE_NUM ); \
ASSERT( nextStep.mCommand->GetType() == COMMAND_TYPE_NUM ); \
\
const POS_OR_QUAT_CLASS prev = static_cast<COMMAND_CLASS*>(prevStep.mCommand.PTR())->GET_POS_OR_QUAT(); \
const POS_OR_QUAT_CLASS next = static_cast<COMMAND_CLASS*>(nextStep.mCommand.PTR())->GET_POS_OR_QUAT(); \
const fp fraction = ComputeInterpolationFraction( prevStep, nextStep ); \
const POS_OR_QUAT_CLASS pos = Interpolate( prev, next, fraction ); \
mAircraft->SET_POS_OR_QUAT( pos ); \
} \
}
Macro for interpolation position or rotation.
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:10