Crazy Eddies GUI System: CEGUI::Affector 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::Affector Class Reference

Defines an 'affector' class. More...

Collaboration diagram for CEGUI::Affector:
[legend]

List of all members.

## Public Types
enum | ApplicationMethod { AM_Absolute, AM_Relative, AM_RelativeMultiply }
| enumerates the possible methods of application More...
## Public Member Functions
| Affector (Animation *parent)
| ~Affector (void)
| destructor, this destroys all key frames defined inside this affector
void | setApplicationMethod (ApplicationMethod method)
| Sets the application method.
ApplicationMethod | getApplicationMethod () const
| Retrieves current application method.
void | setTargetProperty (const String &target)
| Sets the property that will be affected.
const String & | getTargetProperty () const
| Gets the property that will be affected.
void | setInterpolator (Interpolator *interpolator)
| Sets interpolator of this Affector.
void | setInterpolator (const String &name)
| Sets interpolator of this Affector.
Interpolator * | getInterpolator () const
| Retrieves currently used interpolator of this Affector.
KeyFrame * | createKeyFrame (float position)
| Creates a KeyFrame at given position.
KeyFrame * | createKeyFrame (float position, const String &value, KeyFrame::Progression progression=KeyFrame::P_Linear, const String &sourceProperty="")
| Creates a KeyFrame at given position.
void | destroyKeyFrame (KeyFrame *keyframe)
| Destroys given keyframe.
KeyFrame * | getKeyFrameAtPosition (float position) const
| Retrieves a KeyFrame at given position.
KeyFrame * | getKeyFrameAtIdx (size_t index) const
| Retrieves a KeyFrame with given index.
size_t | getNumKeyFrames () const
| Returns number of key frames defined in this affector.
void | moveKeyFrameToPosition (KeyFrame *keyframe, float newPosition)
| Moves given key frame to given new position.
void | moveKeyFrameToPosition (float oldPosition, float newPosition)
| Moves key frame at given old position to given new position.
void | savePropertyValues (AnimationInstance *instance)
| Internal method, causes all properties that are used by this affector and it's keyframes to be saved.
void | apply (AnimationInstance *instance)
| Applies this Affector's definition with parameters from given Animation Instance.

## Detailed Description

Defines an 'affector' class.

Affector is part of Animation definition. It is set to affect one Property using one Interpolator.

Todo:
  moveKeyFrame, this will be vital for any animation editing tools

## Member Enumeration Documentation

enum CEGUI::Affector::ApplicationMethod

enumerates the possible methods of application

Enumerator:

  AM_Absolute | applies values as absolutes
  AM_Relative | saves a base value after the animation is started and applies relatively to that
  AM_RelativeMultiply | saves a base value after the animation is started and applies by multiplying this base value with key frame floats

## Constructor & Destructor Documentation

CEGUI::Affector::Affector | ( | Animation * | parent | ) |

internal constructor, please construct Affectors via Animation::createAffector only

## Member Function Documentation

void CEGUI::Affector::apply | ( | AnimationInstance * | instance | ) |

Applies this Affector's definition with parameters from given Animation Instance.

  This function is internal so unless you know what you're doing, don't touch!

See also:
  AnimationInstance

KeyFrame* CEGUI::Affector::createKeyFrame | ( | float | position,
|  | const String & | value,
|  | KeyFrame::Progression | progression = `KeyFrame::P_Linear`,
|  | const String & | sourceProperty = `""`
| ) |  |

Creates a KeyFrame at given position.

  This is a helper method, you can set all these values after you create the KeyFrame

ApplicationMethod CEGUI::Affector::getApplicationMethod | ( |  | ) | const

Retrieves current application method.

See also:
  Affector::setApplicationMethod

void CEGUI::Affector::savePropertyValues | ( | AnimationInstance * | instance | ) |

Internal method, causes all properties that are used by this affector and it's keyframes to be saved.

  So their values are still known after they've been affected.

void CEGUI::Affector::setApplicationMethod | ( | ApplicationMethod | method | ) |

Sets the application method.

  Values can be applied in 2 ways - as absolute values or relative to base value that is retrieved and saved after animation is started

void CEGUI::Affector::setInterpolator | ( | const String & | name | ) |

Sets interpolator of this Affector.

  Interpolator has to be set for the Affector to work!

void CEGUI::Affector::setInterpolator | ( | Interpolator * | interpolator | ) |

Sets interpolator of this Affector.

  Interpolator has to be set for the Affector to work!