Crazy Eddie's GUI System 0.8.7
Loading...
Searching...
No Matches
KeyFrame.h
1/***********************************************************************
2 created: 7/8/2010
3 author: Martin Preisler
4
5 purpose: Defines the interface for the KeyFrame class
6*************************************************************************/
7/***************************************************************************
8 * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining
11 * a copy of this software and associated documentation files (the
12 * "Software"), to de/al in the Software without restriction, including
13 * without limitation the rights to use, copy, modify, merge, publish,
14 * distribute, sublicense, and/or sell copies of the Software, and to
15 * permit persons to whom the Software is furnished to do so, subject to
16 * the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be
19 * included in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 * OTHER DEALINGS IN THE SOFTWARE.
28 ***************************************************************************/
29#ifndef _CEGUIKeyFrame_h_
30#define _CEGUIKeyFrame_h_
31
32#include "CEGUI/String.h"
33
34// Start of CEGUI namespace section
35namespace CEGUI
36{
37
49class CEGUIEXPORT KeyFrame :
50 public AllocatedObject<KeyFrame>
51{
52public:
70
72 KeyFrame(Affector* parent, float position);
73
75 ~KeyFrame(void);
76
82
90 size_t getIdxInParent() const;
91
97
102 float getPosition() const;
103
114 void setValue(const String& value);
115
120 const String& getValue() const;
121
135
140 const String& getSourceProperty() const;
141
154
168
174
180 float alterInterpolationPosition(float position);
181
188
200
209
210private:
212 Affector* d_parent;
214 float d_position;
215
217 String d_value;
219 String d_sourceProperty;
221 Progression d_progression;
222};
223
224} // End of CEGUI namespace section
225
226#endif // end of guard _CEGUIKeyFrame_h_
227
Defines an 'affector' class.
Definition Affector.h:56
Definition MemoryAllocatedObject.h:110
Defines an 'animation instance' class.
Definition AnimationInstance.h:75
Defines a 'key frame' class.
Definition KeyFrame.h:51
Affector * getParent() const
Retrieves parent Affector of this Key Frame.
~KeyFrame(void)
internal destructor, please use Affector::destroyKeyFrame
size_t getIdxInParent() const
Retrieves index with which this keyframe is retrievable in parent Affector.
void savePropertyValue(AnimationInstance *instance)
Internal method, if this keyframe is using source property, this saves it's value to given instance b...
void moveToPosition(float newPosition)
Moves this keyframe to a new given position.
void setValue(const String &value)
Sets the value of this key frame.
float alterInterpolationPosition(float position)
Internal method, alters interpolation position based on progression method. Don't use unless you know...
void setProgression(Progression p)
Sets the progression method of this key frame.
void writeXMLToStream(XMLSerializer &xml_stream) const
Writes an xml representation of this KeyFrame to out_stream.
const String & getSourceProperty() const
Gets the source property of this key frame.
void notifyPositionChanged(float newPosition)
internal method, notifies this keyframe that it has been moved
Progression
Definition KeyFrame.h:57
@ P_Linear
linear progression
Definition KeyFrame.h:59
@ P_QuadraticDecelerating
progress is decelerated, starts fast and slows down
Definition KeyFrame.h:63
@ P_QuadraticAccelerating
progress is accelerated, starts slow and speeds up
Definition KeyFrame.h:61
float getPosition() const
Retrieves position of this key frame in the animation (in seconds)
KeyFrame(Affector *parent, float position)
internal constructor, please use Affector::createKeyFrame
Progression getProgression() const
Retrieves progression method of this key frame.
const String & getValue() const
Retrieves value of this key frame.
const String & getValueForAnimation(AnimationInstance *instance) const
Retrieves value of this for use when animating.
void setSourceProperty(const String &sourceProperty)
Sets the source property of this key frame.
String class used within the GUI system.
Definition String.h:64
base class for properties able to do native set/get
Definition TypedProperty.h:50
Class used to create XML Document.
Definition XMLSerializer.h:87
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1