Crazy Eddies GUI System: CEGUI::KeyFrame Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
CEGUI::KeyFrame Class Reference

Defines a 'key frame' class. More...

Collaboration diagram for CEGUI::KeyFrame:
[legend]

List of all members.

## Public Types
enum | Progression { P_Linear, P_QuadraticAccelerating, P_QuadraticDecelerating, P_Discrete }
## Public Member Functions
| KeyFrame (Affector *parent, float position)
| internal constructor, please use Affector::createKeyFrame
| ~KeyFrame (void)
| internal destructor, please use Affector::destroyKeyFrame
Affector * | getParent () const
| Retrieves parent Affector of this Key Frame.
void | moveToPosition (float newPosition)
| Moves this keyframe to a new given position.
float | getPosition () const
| Retrieves position of this key frame in the animation (in seconds)
void | setValue (const String &value)
| Sets the value of this key frame.
const String & | getValue () const
| Retrieves value of this key frame.
void | setSourceProperty (const String &sourceProperty)
| Sets the source property of this key frame.
const String & | getSourceProperty () const
| Gets the source property of this key frame.
const String & | getValueForAnimation (AnimationInstance *instance) const
| Retrieves value of this for use when animating.
void | setProgression (Progression p)
| Sets the progression method of this key frame.
Progression | getProgression () const
| Retrieves progression method of this key frame.
float | alterInterpolationPosition (float position)
| Internal method, alters interpolation position based on progression method. Don't use unless you know what you're doing!
void | savePropertyValue (AnimationInstance *instance)
| Internal method, if this keyframe is using source property, this saves it's value to given instance before it's affected.
void | notifyPositionChanged (float newPosition)
| internal method, notifies this keyframe that it has been moved

## Detailed Description

Defines a 'key frame' class.

Key frames are defined inside Affectors. The values they hold are used when animation is precisely at the key frame's position. If it's between two key frames, the value is interpolated.

See also:
  Affector

## Member Enumeration Documentation

enum CEGUI::KeyFrame::Progression

enumerates possible progression methods, IE how the value progresses TOWARS this key frames, this means that progression method of the first key frame won't be used for anything!

Enumerator:

  P_Linear | linear progression
  P_QuadraticAccelerating | progress is accelerated, starts slow and speeds up
  P_QuadraticDecelerating | progress is decelerated, starts fast and slows down
  P_Discrete | left neighbour's value is picked if interpolation position is lower than 1.0, right is only picked when interpolation position is exactly 1.0

## Member Function Documentation

const String& CEGUI::KeyFrame::getValueForAnimation | ( | AnimationInstance * | instance | ) | const

Retrieves value of this for use when animating.

  This is an internal method! Only use if you know what you're doing!

  This returns the base property value if source property is set on this keyframe, it works the same as getValue() if source property is empty

void CEGUI::KeyFrame::notifyPositionChanged | ( | float | newPosition | ) |

internal method, notifies this keyframe that it has been moved

  DO NOT CALL DIRECTLY, should only be used by Affector class

See also:
  KeyFrame::moveToPosition

void CEGUI::KeyFrame::setProgression | ( | Progression | p | ) |

Sets the progression method of this key frame.

  This controls how the animation will progress TOWARDS this key frame, whether it will be a linear motion, accelerated, decelerated, etc...

That means that the progression of the first key frame is never used!

Please see KeyFrame::Progression

void CEGUI::KeyFrame::setSourceProperty | ( | const String & | sourceProperty | ) |

Sets the source property of this key frame.

  Key frame can get it's value from 2 places, it's either stored inside it (setValue, getValue methods) or it's linked to a property (setSourcePropery, getSourceProperty).

The decision about what value is used is simple, if there is a source property (sourceProperty is not empty, it's used)

void CEGUI::KeyFrame::setValue | ( | const String & | value | ) |

Sets the value of this key frame.

  This is only used if source property is empty!

See also:
  KeyFrame::setSourceProperty