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

Implements a curve of FStrings. 更多...

#include <StringCurve.h>

+ 类 FStringCurve 继承关系图:

Public 成员函数

FKeyHandle AddKey (float InTime, const FString &InValue, FKeyHandle KeyHandle=FKeyHandle())
 Add a new key to the curve with the supplied Time and Value. 更多...
 
void ClearDefaultValue ()
 Clears the default value for this curve if it has been set.
 
void DeleteKey (FKeyHandle KeyHandle)
 Remove the specified key from the curve. 更多...
 
virtual FIndexedCurve * Duplicate () const final
 Allocates a duplicate of the curve
 
FString Eval (float Time, const FString &InDefaultValue) const
 Evaluate the curve at the specified time. 更多...
 
FKeyHandle FindKey (float KeyTime, float KeyTimeTolerance=KINDA_SMALL_NUMBER) const
 Finds a key a the specified time. 更多...
 
FString GetDefaultValue () const
 Get the default value for the curve
 
FStringCurveKey & GetKey (FKeyHandle KeyHandle)
 Get a key. 更多...
 
const TArray< FStringCurveKey > & GetKeys () const
 Read-only access to the key collection. 更多...
 
virtual float GetKeyTime (FKeyHandle KeyHandle) const override final
 Get the time for the Key with the specified index. 更多...
 
FString GetKeyValue (FKeyHandle KeyHandle) const
 Get the value for the Key with the specified index. 更多...
 
virtual int32 GetNumKeys () const override final
 Get number of keys in curve.
 
bool HasAnyData () const
 Check whether this curve has any data or not
 
void RemoveRedundantKeys ()
 Tries to reduce the number of keys required for accurate evaluation (removing duplicates)
 
void SetDefaultValue (const FString &InDefaultValue)
 Set the default value of the curve. 更多...
 
virtual void SetKeyTime (FKeyHandle KeyHandle, float NewTime) override final
 Move a key to a new time. 更多...
 
void SetKeyValue (FKeyHandle KeyHandle, FString NewValue)
 Assign a new value to a key. 更多...
 
FKeyHandle UpdateOrAddKey (float InTime, const FString &InValue, float KeyTimeTolerance=KINDA_SMALL_NUMBER)
 Finds the key at InTime, and updates its value. 更多...
 
virtual ~FStringCurve ()
 Virtual destructor.
 
- Public 成员函数 继承自 FIndexedCurve
virtual FIndexedCurve * Duplicate () const
 Allocates a duplicate of the curve
 
 FIndexedCurve ()
 Default constructor.
 
FKeyHandle GetFirstKeyHandle () const
 Gets the key handle for the first key in the curve
 
int32 GetIndexSafe (FKeyHandle KeyHandle) const
 Gets the index of a handle, checks if the key handle is valid first.
 
TArray< FKeyHandle >::TConstIterator GetKeyHandleIterator () const
 Const iterator for the handles.
 
virtual float GetKeyTime (FKeyHandle KeyHandle) const
 Get the time for the Key with the specified index.
 
FKeyHandle GetLastKeyHandle () const
 Gets the key handle for the last key in the curve
 
FKeyHandle GetNextKey (FKeyHandle KeyHandle) const
 Get the next key given the key handle
 
virtual int32 GetNumKeys () const
 Get number of keys in curve.
 
FKeyHandle GetPreviousKey (FKeyHandle KeyHandle) const
 Get the previous key given the key handle
 
bool IsKeyHandleValid (FKeyHandle KeyHandle) const
 Checks to see if the key handle is valid for this curve.
 
void ScaleCurve (float ScaleOrigin, float ScaleFactor)
 Scales all keys about an origin, preserving order
 
virtual void SetKeyTime (FKeyHandle KeyHandle, float NewTime)
 Move a key to a new time. 更多...
 
void ShiftCurve (float DeltaTime)
 Shifts all keys forwards or backwards in time by an even amount, preserving order
 

Public 属性

FString DefaultValue
 Default value
 
TArray< FStringCurveKey > Keys
 Sorted array of keys
 

额外继承的成员函数

- Protected 成员函数 继承自 FIndexedCurve
void EnsureAllIndicesHaveHandles () const
 Makes sure our handles are all valid and correct.
 
const int32 * FindIndex (FKeyHandle KeyHandle) const
 Gets the index of a handle .
 
int32 GetIndex (FKeyHandle KeyHandle) const
 Gets the index of a handle.
 
FKeyHandle GetKeyHandle (int32 KeyIndex) const
 Internal tool to get a handle from an index.
 
- Protected 属性 继承自 FIndexedCurve
FKeyHandleMap KeyHandlesToIndices
 Map of which key handles go to which indices.
 

详细描述

Implements a curve of FStrings.

成员函数说明

◆ AddKey()

FKeyHandle FStringCurve::AddKey ( float  InTime,
const FString &  InValue,
FKeyHandle  KeyHandle = FKeyHandle() 
)

Add a new key to the curve with the supplied Time and Value.

Returns the handle of the new key.

参数
InTimeThe time at which to add the key.
InValueThe value of the key.
KeyHandleOptional handle for the new key.

◆ DeleteKey()

void FStringCurve::DeleteKey ( FKeyHandle  KeyHandle)

Remove the specified key from the curve.

参数
KeyHandleHandle to the key to remove.

◆ Eval()

FString FStringCurve::Eval ( float  Time,
const FString &  InDefaultValue 
) const

Evaluate the curve at the specified time.

参数
TimeThe time to evaluate.
InDefaultValueThe default value if no key exists.
返回
The evaluated string.

◆ FindKey()

FKeyHandle FStringCurve::FindKey ( float  KeyTime,
float  KeyTimeTolerance = KINDA_SMALL_NUMBER 
) const

Finds a key a the specified time.

参数
KeyTimeThe time at which to find the key.
KeyTimeToleranceThe key time tolerance to use for equality.
返回
A handle to the key, or invalid key handle if not found.

◆ GetKey()

FStringCurveKey & FStringCurve::GetKey ( FKeyHandle  KeyHandle)

Get a key.

参数
KeyHandleThe handle of the key to get.
返回
The key.

◆ GetKeys()

const TArray< FStringCurveKey > & FStringCurve::GetKeys ( ) const
inline

Read-only access to the key collection.

返回
Collection of keys.

◆ GetKeyTime()

virtual float FStringCurve::GetKeyTime ( FKeyHandle  KeyHandle) const
finaloverridevirtual

Get the time for the Key with the specified index.

参数
KeyHandleHandle to the key whose time to get.
返回
The key's time.

重载 FIndexedCurve .

◆ GetKeyValue()

FString FStringCurve::GetKeyValue ( FKeyHandle  KeyHandle) const

Get the value for the Key with the specified index.

参数
KeyHandleHandle to the key whose value to get.
返回
The key's value.

◆ SetDefaultValue()

void FStringCurve::SetDefaultValue ( const FString &  InDefaultValue)
inline

Set the default value of the curve.

参数
InDefaultValueThe value to set.

◆ SetKeyTime()

virtual void FStringCurve::SetKeyTime ( FKeyHandle  KeyHandle,
float  NewTime 
)
finaloverridevirtual

Move a key to a new time.

参数
KeyHandleThe handle of the key to change.
NewTimeThe new time to set on the key.

重载 FIndexedCurve .

◆ SetKeyValue()

void FStringCurve::SetKeyValue ( FKeyHandle  KeyHandle,
FString  NewValue 
)

Assign a new value to a key.

参数
KeyHandleThe handle of the key to change.
NewTimeThe new value to set on the key.

◆ UpdateOrAddKey()

FKeyHandle FStringCurve::UpdateOrAddKey ( float  InTime,
const FString &  InValue,
float  KeyTimeTolerance = KINDA_SMALL_NUMBER 
)

Finds the key at InTime, and updates its value.

If it can't find the key within the KeyTimeTolerance, it adds one at that time.

参数
InTimeThe time at which the key should be added or updated.
InValueThe value of the key.
KeyTimeToleranceThe tolerance used for key time equality.

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