class GmAnimation

The animation class encapsulates a set of animation segments and provides complex translation, rotation and scaling movements for visual glam components

Public Methods

[more] GmAnimation (GmTypes::AnimationType animationType)
Standard constructor.
[more]virtual void addSegment (GmAnimationSegment* animationSegment)
Adds an animation segment to the end of the animation.
[more]virtual void applyAnimationTransforms ()
Applies all animation motions associated with this animation
[more]float getLength ()
Gets the total temporal length of this animation in seconds.
[more]virtual bool isFinished ()
The current state of animation playback can be determined by calling this method.
[more]virtual void registerAnimHandler (GmAnimationEventHandler* eventHandler)
Registers an animation event handler with this animation.
[more]virtual void startAnimation ()
Starts running this animation using the current time as the starting time.
[more]virtual void unregisterAnimHandler (GmAnimationEventHandler* eventHandler)
Unregisters an animation event handler from this animation.
[more]virtual ~GmAnimation ()
Standard destructor

Protected Fields

[more]vector<GmAnimationEventHandler*> mAnimHandlers
A set of animation event handlers that have registered themselves with this animation.
[more]unsigned int mAnimLength
Total animation length in milliseconds
[more]unsigned int* mAnimTimecodes [2]
Animation segment time codes for the end of each animation segment.
[more]GmTypes::AnimationType mAnimationType
The type of animation this animation object encompasses
[more]vector<GmAnimationSegment*> mSegments
A set of animation segments that constitute a complete animation
[more]unsigned int mStartTime
The time that this animation started playback, the value is in milliseconds since application started
[more]unsigned int mTimecodeOffset
The current timecode offset, which is the current animation segment being played back.

Protected Methods

[more]virtual void recalculateAnimLength ()
Recalculates the length of the animation as well as several internal variables that are used for housekeeping


Documentation

The animation class encapsulates a set of animation segments and provides complex translation, rotation and scaling movements for visual glam components
oGmTypes::AnimationType mAnimationType
The type of animation this animation object encompasses

ovector<GmAnimationSegment*> mSegments
A set of animation segments that constitute a complete animation

ovector<GmAnimationEventHandler*> mAnimHandlers
A set of animation event handlers that have registered themselves with this animation. The animation event handlers are notified whenever a particular animation event occurs (such as when an animation finishes playing).

ounsigned int mStartTime
The time that this animation started playback, the value is in milliseconds since application started

ounsigned int mAnimLength
Total animation length in milliseconds

ounsigned int* mAnimTimecodes[2]
Animation segment time codes for the end of each animation segment. These values allow us to determine the correct animation segment to evaluate for the current time.

ounsigned int mTimecodeOffset
The current timecode offset, which is the current animation segment being played back. This member variable is used to keep track of which animation segment we are currently evaluating.

ovirtual void recalculateAnimLength()
Recalculates the length of the animation as well as several internal variables that are used for housekeeping

o GmAnimation(GmTypes::AnimationType animationType)
Standard constructor.

Parameters:
animationType - the type of animation that this is (mouse press, idle, keypress, focus, etc)

ovirtual ~GmAnimation()
Standard destructor

ovirtual void startAnimation()
Starts running this animation using the current time as the starting time. The animation will run until the total length of the animation has elapsed, at which point isFinished() will return true. If the animation has already started running, it will restart from the beginning.

ovirtual bool isFinished()
The current state of animation playback can be determined by calling this method.

Returns:
true if the animation has finished playback, false if it has not.

ofloat getLength()
Gets the total temporal length of this animation in seconds. This value is a sum of all the length of the animation segments that are part of this animation.

Returns:
the total temporal length of this animation in seconds.

ovirtual void applyAnimationTransforms()
Applies all animation motions associated with this animation

ovirtual void addSegment(GmAnimationSegment* animationSegment)
Adds an animation segment to the end of the animation.

Parameters:
animationSegment - the animation segment to add to the end of this animation.

ovirtual void registerAnimHandler(GmAnimationEventHandler* eventHandler)
Registers an animation event handler with this animation. An animation event handler processes animation-based events such as animation start, completion, etc.

Parameters:
eventHandler - the handler to register with this animation.

ovirtual void unregisterAnimHandler(GmAnimationEventHandler* eventHandler)
Unregisters an animation event handler from this animation. An animation event handler processes animation-based events such as animation start, completion, etc.

Parameters:
eventHandler - the animation event handler to unregister


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.