A static class for managing animation playback.
Synopsis
#include <AlPlayBack.h> class AlPlayBack
static void playForward (); static void playReverse (); static void stop (); static boolean inPlayBack (); static void nextFrame (); static void previousFrame (); static void nextKeyframe (); static void previousKeyframe (); static void gotoStart (); static void gotoEnd (); static void gotoFrame (const double frame); static AlCallBack *setCallBack (AlCallBack *callBack); static void getStartEndBy (double &start, double &end, double &by);
Description
These set of static methods provide a plug-in developer with the ability to initiate and manage animation playback. A callback
facility is also provided, which allows polling type plug-ins to do a limited set of operations after each frame has been
displayed.
Be VERY CAREFUL about what you do in this callback. As part of its optimization technique, a lot of animation information
is cached outside of the normal messaging system. This means that if you delete some animation objects while playback is active,
at some stage PowerAnimator will become very confused (as in core dump confused).
Note that this class only functions in OpenAlias. In OpenModel the class exists but does not do anything.
void AlPlayBack::playForward ()
Description
Begins (or continues) playback forward.
void AlPlayBack::playReverse ()
Description
Begins (or continues) playback reverse.
void AlPlayBack::stop ()
Description
Stops playback.
boolean AlPlayBack::inPlayBack ()
Description
Returns TRUE if Alias is currently in playback.
void AlPlayBack::nextFrame ()
Description
Increments the current playing frame (or views the next frame if you are not in playback mode).
void AlPlayBack::previousFrame ()
Description
Decrements the current playing frame (or views the previous frame if you are not in playback mode).
void AlPlayBack::nextKeyframe ()
Description
Advances the current playing frame to the next keyframe for currently selected objects (or views that frame if you are not
in playback mode).
void AlPlayBack::previousKeyframe ()
Description
Backs up the current playing frame to the previous keyframe for currently selected objects (or views that frame if you are
not in playback mode).
void AlPlayBack::gotoStart ()
Description
Sets the current playing frame to the start of the animation (or views that frame if you are not in playback mode).
void AlPlayBack::gotoEnd ()
Description
Sets the current playing frame to the end of the animation (or views that frame if you are not in playback mode).
void AlPlayBack::gotoFrame (const double frame)
Description
Sets the current playing frame to the requested frame (or views that frame if you are not in playback mode).
void AlPlayBack::getStartEndBy (double &start, double &end, double &by)
Description
Gets the current start/end/by values specified by the user.
AlCallBack *AlPlayBack::setCallBack (AlCallBack *callBack)
Description
Sets the current playback callback function. During playback, this function will be called after each frame is displayed.
This function is primarily intended to be used by device polling plug-ins that may wish to alter playback conditions. The
current callback function is returned, and you should restore that function when you are done.