Crazy Eddie's GUI System
${CEGUI_VERSION}
|
Defines an 'affector' class. More...
Public Types | |
enum | ApplicationMethod { AM_Absolute, AM_Relative, AM_RelativeMultiply, AM_Absolute, AM_Relative, AM_RelativeMultiply } |
enumerates the possible methods of application More... | |
enum | ApplicationMethod { AM_Absolute, AM_Relative, AM_RelativeMultiply, 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 | |
Animation * | getParent () const |
Retrieves the parent animation of this keyframe. | |
size_t | getIdxInParent () const |
Retrieves index with which this affector is retrievable in parent Animation. More... | |
void | setApplicationMethod (ApplicationMethod method) |
Sets the application method. More... | |
ApplicationMethod | getApplicationMethod () const |
Retrieves current application method. More... | |
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. More... | |
void | setInterpolator (const String &name) |
Sets interpolator of this Affector. More... | |
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. More... | |
void | destroyKeyFrame (KeyFrame *keyframe) |
Destroys given keyframe. | |
KeyFrame * | getKeyFrameAtPosition (float position) const |
Retrieves a KeyFrame at given position. | |
bool | hasKeyFrameAtPosition (float position) const |
Checks whether there is a key frame 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. More... | |
void | apply (AnimationInstance *instance) |
Applies this Affector's definition with parameters from given Animation Instance. More... | |
void | writeXMLToStream (XMLSerializer &xml_stream) const |
Writes an xml representation of this Affector to out_stream. More... | |
Affector (Animation *parent) | |
~Affector (void) | |
destructor, this destroys all key frames defined inside this affector | |
Animation * | getParent () const |
Retrieves the parent animation of this keyframe. | |
size_t | getIdxInParent () const |
Retrieves index with which this affector is retrievable in parent Animation. More... | |
void | setApplicationMethod (ApplicationMethod method) |
Sets the application method. More... | |
ApplicationMethod | getApplicationMethod () const |
Retrieves current application method. More... | |
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. More... | |
void | setInterpolator (const String &name) |
Sets interpolator of this Affector. More... | |
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. More... | |
void | destroyKeyFrame (KeyFrame *keyframe) |
Destroys given keyframe. | |
KeyFrame * | getKeyFrameAtPosition (float position) const |
Retrieves a KeyFrame at given position. | |
bool | hasKeyFrameAtPosition (float position) const |
Checks whether there is a key frame 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. More... | |
void | apply (AnimationInstance *instance) |
Applies this Affector's definition with parameters from given Animation Instance. More... | |
void | writeXMLToStream (XMLSerializer &xml_stream) const |
Writes an xml representation of this Affector to out_stream. More... | |
Defines an 'affector' class.
Affector is part of Animation definition. It is set to affect one Property using one Interpolator.
Affector is part of Animation definition. It is set to affect one Property using one Interpolator.
enumerates the possible methods of application
enumerates the possible methods of application
CEGUI::Affector::Affector | ( | Animation * | parent | ) |
internal constructor, please construct Affectors via Animation::createAffector only
CEGUI::Affector::Affector | ( | Animation * | parent | ) |
internal constructor, please construct Affectors via Animation::createAffector only
void CEGUI::Affector::apply | ( | AnimationInstance * | instance | ) |
Applies this Affector's definition with parameters from given Animation Instance.
References CEGUI::KeyFrame::alterInterpolationPosition(), AM_Absolute, AM_Relative, AM_RelativeMultiply, CEGUI::String::empty(), CEGUI::KeyFrame::getPosition(), CEGUI::AnimationInstance::getPosition(), CEGUI::AnimationInstance::getSavedPropertyValue(), CEGUI::AnimationInstance::getTarget(), getTargetProperty(), CEGUI::KeyFrame::getValueForAnimation(), CEGUI::Interpolator::interpolateAbsolute(), CEGUI::Interpolator::interpolateRelative(), CEGUI::Interpolator::interpolateRelativeMultiply(), CEGUI::PropertySet::setProperty(), and CEGUI::Warnings.
void CEGUI::Affector::apply | ( | AnimationInstance * | instance | ) |
Applies this Affector's definition with parameters from given Animation Instance.
KeyFrame* CEGUI::Affector::createKeyFrame | ( | float | position, |
const String & | value, | ||
KeyFrame::Progression | progression = KeyFrame::P_Linear , |
||
const String & | sourceProperty = "" |
||
) |
KeyFrame * CEGUI::Affector::createKeyFrame | ( | float | position, |
const String & | value, | ||
KeyFrame::Progression | progression = KeyFrame::P_Linear , |
||
const String & | sourceProperty = "" |
||
) |
Creates a KeyFrame at given position.
References createKeyFrame(), CEGUI::KeyFrame::setProgression(), CEGUI::KeyFrame::setSourceProperty(), and CEGUI::KeyFrame::setValue().
Affector::ApplicationMethod CEGUI::Affector::getApplicationMethod | ( | ) | const |
Retrieves current application method.
Referenced by writeXMLToStream().
ApplicationMethod CEGUI::Affector::getApplicationMethod | ( | ) | const |
Retrieves current application method.
size_t CEGUI::Affector::getIdxInParent | ( | ) | const |
Retrieves index with which this affector is retrievable in parent Animation.
References CEGUI::Animation::getAffectorAtIdx(), and getParent().
size_t CEGUI::Affector::getIdxInParent | ( | ) | const |
Retrieves index with which this affector is retrievable in parent Animation.
void CEGUI::Affector::savePropertyValues | ( | AnimationInstance * | instance | ) |
Internal method, causes all properties that are used by this affector and it's keyframes to be saved.
void CEGUI::Affector::savePropertyValues | ( | AnimationInstance * | instance | ) |
Internal method, causes all properties that are used by this affector and it's keyframes to be saved.
References AM_Relative, AM_RelativeMultiply, and CEGUI::AnimationInstance::savePropertyValue().
void CEGUI::Affector::setApplicationMethod | ( | ApplicationMethod | method | ) |
Sets the application method.
Referenced by CEGUI::AnimationDefinitionHandler::elementEndLocal().
void CEGUI::Affector::setApplicationMethod | ( | ApplicationMethod | method | ) |
Sets the application method.
void CEGUI::Affector::setInterpolator | ( | Interpolator * | interpolator | ) |
Sets interpolator of this Affector.
void CEGUI::Affector::setInterpolator | ( | Interpolator * | interpolator | ) |
Sets interpolator of this Affector.
Referenced by CEGUI::Animation::createAffector().
void CEGUI::Affector::setInterpolator | ( | const String & | name | ) |
Sets interpolator of this Affector.
void CEGUI::Affector::setInterpolator | ( | const String & | name | ) |
Sets interpolator of this Affector.
void CEGUI::Affector::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this Affector to out_stream.
xml_stream | Stream where xml data should be output. |
void CEGUI::Affector::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this Affector to out_stream.
xml_stream | Stream where xml data should be output. |
References AM_Absolute, AM_Relative, AM_RelativeMultiply, CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), CEGUI::AnimationAffectorHandler::ElementName, getApplicationMethod(), getInterpolator(), getTargetProperty(), and CEGUI::XMLSerializer::openTag().