A sequence of curves that can be used to drive animations for slate widgets. 更多...
#include <CurveSequence.h>
类 FCurveSequence 继承关系图:类 | |
| struct | FSlateCurve |
| A curve has a time offset and duration. 更多... | |
Public 成员函数 | |
| FCurveHandle | AddCurve (const float InStartTimeSeconds, const float InDurationSeconds, const ECurveEaseFunction InEaseFunction=ECurveEaseFunction::Linear) |
| Add a new curve at a given time and offset. 更多... | |
| FCurveHandle | AddCurveRelative (const float InOffset, const float InDurationSecond, const ECurveEaseFunction InEaseFunction=ECurveEaseFunction::Linear) |
| Add a new curve relative to the current end of the sequence. 更多... | |
| FCurveSequence () | |
| Default constructor | |
| FCurveSequence (const float InStartTimeSeconds, const float InDurationSeconds, const ECurveEaseFunction InEaseFunction=ECurveEaseFunction::Linear) | |
| Construct by adding a single animation curve to this sequence. 更多... | |
| const FCurveSequence::FSlateCurve & | GetCurve (int32 CurveIndex) const |
| float | GetLerp () const |
| For single-curve animations, returns the interpolation alpha for the animation. 更多... | |
| float | GetSequenceTime () const |
| bool | IsAtEnd () const |
| Is the sequence at the end? | |
| bool | IsAtStart () const |
| Is the sequence at the start? | |
| bool | IsForward () const |
| bool | IsInReverse () const |
| bool | IsLooping () const |
| Is the sequence looping? | |
| bool | IsPlaying () const |
| Checks whether the sequence is currently playing. 更多... | |
| void | JumpToEnd () |
| Jumps immediately to the end of the animation sequence | |
| void | JumpToStart () |
| Jumps immediately to the beginning of the animation sequence | |
| void | Pause () |
| Pause this curve sequence. | |
| void | Play (const FTickerDelegate &InDelegate, bool bPlayLooped=false, const float StartAtTime=0.0f) |
| Plays the curve sequence for a ticker, rather than a widget. | |
| void | Play (const TSharedRef< SWidget > &InOwnerWidget, bool bPlayLooped=false, const float StartAtTime=0.0f, bool bRequiresActiveTimer=true) |
| Start playing this curve sequence. 更多... | |
| void | PlayReverse (const TSharedRef< SWidget > &InOwnerWidget, bool bPlayLooped=false, const float StartAtTime=0.0f, bool bRequiresActiveTimer=true) |
| Start playing this curve sequence in reverse. 更多... | |
| void | Resume () |
| Unpause this curve sequence to resume play. | |
| void | Reverse () |
| Reverse the direction of an in-progress animation | |
| ~FCurveSequence () | |
| Makes sure the active timer is unregistered | |
Public 成员函数 继承自 TSharedFromThis< FCurveSequence > | |
| TSharedRef< FCurveSequence, Mode > | AsShared () |
| Provides access to a shared reference to this object. 更多... | |
| TSharedRef< FCurveSequence const, Mode > | AsShared () const |
| Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多... | |
| FORCEINLINE bool | DoesSharedInstanceExist () const |
| Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多... | |
| FORCEINLINE void | UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const |
| INTERNAL USE ONLY – Do not call this method. 更多... | |
| FORCEINLINE void | UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const |
| INTERNAL USE ONLY – Do not call this method. 更多... | |
Protected 成员函数 | |
| void | SetStartTime (double InStartTime) |
Protected 成员函数 继承自 TSharedFromThis< FCurveSequence > | |
| FORCEINLINE TSharedFromThis & | operator= (TSharedFromThis const &) |
| Hidden stub assignment operator | |
| TSharedFromThis () | |
| Hidden stub constructor | |
| TSharedFromThis (TSharedFromThis const &) | |
| Hidden stub copy constructor | |
| ~TSharedFromThis () | |
| Hidden destructor | |
额外继承的成员函数 | |
静态 Protected 成员函数 继承自 TSharedFromThis< FCurveSequence > | |
| static FORCEINLINE TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
| Provides access to a shared reference to an object, given the object's 'this' pointer. 更多... | |
| static FORCEINLINE TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| Provides access to a shared reference to an object, given the object's 'this' pointer. 更多... | |
A sequence of curves that can be used to drive animations for slate widgets.
Active timer registration is handled for the widget being animated when calling play.
Each curve within the sequence has a time offset and a duration. This makes FCurveSequence convenient for crating staggered animations. e.g. // We want to zoom in a widget, and then fade in its contents. FCurveHandle ZoomCurve = Sequence.AddCurve( 0, 0.15f ); FCurveHandle FadeCurve = Sequence.AddCurve( 0.15f, 0.1f ); Sequence.Play( this->AsShared() );
| FCurveSequence::FCurveSequence | ( | const float | InStartTimeSeconds, |
| const float | InDurationSeconds, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Construct by adding a single animation curve to this sequence.
Does not provide access to the curve though.
| InStartTimeSeconds | When to start this curve. |
| InDurationSeconds | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| FCurveHandle FCurveSequence::AddCurve | ( | const float | InStartTimeSeconds, |
| const float | InDurationSeconds, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Add a new curve at a given time and offset.
| InStartTimeSeconds | When to start this curve. |
| InDurationSeconds | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| FCurveHandle FCurveSequence::AddCurveRelative | ( | const float | InOffset, |
| const float | InDurationSecond, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Add a new curve relative to the current end of the sequence.
Makes stacking easier. e.g. doing AddCurveRelative(0,5); AddCurveRelative(0,3); Is equivalent to AddCurve(0,5); AddCurve(5,3)
| InOffset | Offset from the last curve in the sequence. |
| InDurationSecond | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| const FCurveSequence::FSlateCurve & FCurveSequence::GetCurve | ( | int32 | CurveIndex | ) | const |
| CurveIndex | Index of a curve in the curves array. |
| float FCurveSequence::GetLerp | ( | ) | const |
For single-curve animations, returns the interpolation alpha for the animation.
If you call this function on a sequence with multiple curves, an assertion will trigger.
| float FCurveSequence::GetSequenceTime | ( | ) | const |
| bool FCurveSequence::IsForward | ( | ) | const |
| bool FCurveSequence::IsInReverse | ( | ) | const |
| bool FCurveSequence::IsPlaying | ( | ) | const |
Checks whether the sequence is currently playing.
| void FCurveSequence::Play | ( | const TSharedRef< SWidget > & | InOwnerWidget, |
| bool | bPlayLooped = false, |
||
| const float | StartAtTime = 0.0f, |
||
| bool | bRequiresActiveTimer = true |
||
| ) |
Start playing this curve sequence.
Registers an active timer with the widget being animated.
| InOwnerWidget | The widget that is being animated by this sequence. |
| bPlayLooped | True if the curve sequence should play continually on a loop. Note that the active timer will persist until this sequence is paused or jumped to the start/end. |
| StartAtTime | The relative time within the animation at which to begin playing (i.e. 0.0f is the beginning). |
| bRequiresActiveTimer | Whether or not we need to register an active timer on the widget to keep slate ticking while the animation is playing. If that is not necessary in your use case, you can set it to false for a small performance boost |
| void FCurveSequence::PlayReverse | ( | const TSharedRef< SWidget > & | InOwnerWidget, |
| bool | bPlayLooped = false, |
||
| const float | StartAtTime = 0.0f, |
||
| bool | bRequiresActiveTimer = true |
||
| ) |
Start playing this curve sequence in reverse.
Registers an active timer for the widget using the sequence.
| InOwnerWidget | The widget that is being animated by this sequence. |
| bPlayLooped | True if the curve sequence should play continually on a loop. Note that the active timer will persist until this sequence is paused or jumped to the start/end. |
| StartAtTime | The relative time within the animation at which to begin playing (i.e. 0.0f is the beginning). |
| bRequiresActiveTimer | Whether or not we need to register an active timer on the widget to keep slate ticking while the animation is playing. If that is not necessary in your use case, you can set it to false for a small performance boost |
|
protected |
| InStartTime | when this curve sequence started playing |