engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | Protected 成员函数 | 所有成员列表
FCurveSequence结构体 参考

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::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.

参数
InStartTimeSecondsWhen to start this curve.
InDurationSecondsHow long this curve lasts.
InEaseFunctionEasing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions.
返回
A FCurveHandle that can be used to get the value of this curve after the animation starts playing.

成员函数说明

◆ AddCurve()

FCurveHandle FCurveSequence::AddCurve ( const float  InStartTimeSeconds,
const float  InDurationSeconds,
const ECurveEaseFunction  InEaseFunction = ECurveEaseFunction::Linear 
)

Add a new curve at a given time and offset.

参数
InStartTimeSecondsWhen to start this curve.
InDurationSecondsHow long this curve lasts.
InEaseFunctionEasing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions.
返回
A FCurveHandle that can be used to get the value of this curve after the animation starts playing.

◆ AddCurveRelative()

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)

参数
InOffsetOffset from the last curve in the sequence.
InDurationSecondHow long this curve lasts.
InEaseFunctionEasing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions.

◆ GetCurve()

const FCurveSequence::FSlateCurve & FCurveSequence::GetCurve ( int32  CurveIndex) const
参数
CurveIndexIndex of a curve in the curves array.
返回
A curve given the index into the curves array

◆ GetLerp()

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.

返回
A linearly interpolated value between 0 and 1 for this curve.

◆ GetSequenceTime()

float FCurveSequence::GetSequenceTime ( ) const
返回
the current time relative to the beginning of the sequence.

◆ IsForward()

bool FCurveSequence::IsForward ( ) const
返回
true if the animation is in forward gear

◆ IsInReverse()

bool FCurveSequence::IsInReverse ( ) const
返回
true if the animation is in reverse

◆ IsPlaying()

bool FCurveSequence::IsPlaying ( ) const

Checks whether the sequence is currently playing.

返回
true if playing, false otherwise.

◆ Play()

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.

参数
InOwnerWidgetThe widget that is being animated by this sequence.
bPlayLoopedTrue 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.
StartAtTimeThe relative time within the animation at which to begin playing (i.e. 0.0f is the beginning).
bRequiresActiveTimerWhether 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

◆ PlayReverse()

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.

参数
InOwnerWidgetThe widget that is being animated by this sequence.
bPlayLoopedTrue 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.
StartAtTimeThe relative time within the animation at which to begin playing (i.e. 0.0f is the beginning).
bRequiresActiveTimerWhether 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

◆ SetStartTime()

void FCurveSequence::SetStartTime ( double  InStartTime)
protected
参数
InStartTimewhen this curve sequence started playing

该结构体的文档由以下文件生成: