UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FNameCurve Struct Reference

#include <NameCurve.h>

+ Inheritance diagram for FNameCurve:

Public Member Functions

virtual ~FNameCurve ()
 
ENGINE_API FKeyHandle AddKey (float InTime, const FName &InValue, FKeyHandle KeyHandle=FKeyHandle())
 
ENGINE_API void DeleteKey (FKeyHandle KeyHandle)
 
ENGINE_API FKeyHandle FindKey (float KeyTime, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER) const
 
ENGINE_API FNameCurveKeyGetKey (FKeyHandle KeyHandle)
 
ENGINE_API FNameCurveKey GetKey (FKeyHandle KeyHandle) const
 
const TArray< FNameCurveKey > & GetKeys () const
 
virtual ENGINE_API float GetKeyTime (FKeyHandle KeyHandle) const override final
 
virtual ENGINE_API void SetKeyTime (FKeyHandle KeyHandle, float NewTime) override final
 
ENGINE_API FKeyHandle UpdateOrAddKey (float InTime, const FName &InValue, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER)
 
virtual int32 GetNumKeys () const override final
 
virtual FIndexedCurveDuplicate () const final
 
- Public Member Functions inherited from FIndexedCurve
 FIndexedCurve ()
 
virtual ~FIndexedCurve ()
 
ENGINE_API int32 GetIndexSafe (FKeyHandle KeyHandle) const
 
TArray< FKeyHandle >::TConstIterator GetKeyHandleIterator () const
 
ENGINE_API bool IsKeyHandleValid (FKeyHandle KeyHandle) const
 
FKeyHandle GetFirstKeyHandle () const
 
FKeyHandle GetLastKeyHandle () const
 
ENGINE_API FKeyHandle GetNextKey (FKeyHandle KeyHandle) const
 
ENGINE_API FKeyHandle GetPreviousKey (FKeyHandle KeyHandle) const
 
ENGINE_API void ShiftCurve (float DeltaTime)
 
ENGINE_API void ShiftCurve (float DeltaTime, const TSet< FKeyHandle > &KeyHandles)
 
ENGINE_API void ScaleCurve (float ScaleOrigin, float ScaleFactor)
 
ENGINE_API void ScaleCurve (float ScaleOrigin, float ScaleFactor, const TSet< FKeyHandle > &KeyHandles)
 

Public Attributes

TArray< FNameCurveKeyKeys
 
- Public Attributes inherited from FIndexedCurve
virtual int32 GetNumKeys () const PURE_VIRTUAL(FIndexedCurve
 
virtual void virtual SetKeyTime(FKeyHandle KeyHandle, float NewTime) PURE_VIRTUAL(FIndexedCurve float GetKeyTime (FKeyHandle KeyHandle) const PURE_VIRTUAL(FIndexedCurve
 
virtual FIndexedCurveDuplicate () const PURE_VIRTUAL(FIndexedCurve
 

Additional Inherited Members

- Protected Member Functions inherited from FIndexedCurve
void EnsureAllIndicesHaveHandles () const
 
void EnsureIndexHasAHandle (int32 KeyIndex) const
 
const int32FindIndex (FKeyHandle KeyHandle) const
 
ENGINE_API int32 GetIndex (FKeyHandle KeyHandle) const
 
ENGINE_API FKeyHandle GetKeyHandle (int32 KeyIndex) const
 
- Protected Attributes inherited from FIndexedCurve
FKeyHandleMap KeyHandlesToIndices
 

Detailed Description

Implements a curve of FNames.

Constructor & Destructor Documentation

◆ ~FNameCurve()

virtual FNameCurve::~FNameCurve ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ AddKey()

FKeyHandle FNameCurve::AddKey ( float  InTime,
const FName InValue,
FKeyHandle  KeyHandle = FKeyHandle() 
)

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

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

◆ DeleteKey()

void FNameCurve::DeleteKey ( FKeyHandle  KeyHandle)

Remove the specified key from the curve.

Parameters
KeyHandleHandle to the key to remove.

◆ Duplicate()

virtual FIndexedCurve * FNameCurve::Duplicate ( ) const
inlinefinalvirtual

Allocates a duplicate of the curve

◆ FindKey()

FKeyHandle FNameCurve::FindKey ( float  KeyTime,
float  KeyTimeTolerance = UE_KINDA_SMALL_NUMBER 
) const

Finds a key a the specified time.

Parameters
KeyTimeThe time at which to find the key.
KeyTimeToleranceThe key time tolerance to use for equality.
Returns
A handle to the key, or invalid key handle if not found.

◆ GetKey() [1/2]

FNameCurveKey & FNameCurve::GetKey ( FKeyHandle  KeyHandle)

Get a key.

Parameters
KeyHandleThe handle of the key to get.
Returns
The key.

◆ GetKey() [2/2]

FNameCurveKey FNameCurve::GetKey ( FKeyHandle  KeyHandle) const

◆ GetKeys()

const TArray< FNameCurveKey > & FNameCurve::GetKeys ( ) const
inline

Read-only access to the key collection.

Returns
Collection of keys.

◆ GetKeyTime()

float FNameCurve::GetKeyTime ( FKeyHandle  KeyHandle) const
finaloverridevirtual

Get the time for the Key with the specified index.

Parameters
KeyHandleHandle to the key whose time to get.
Returns
The key's time.

◆ GetNumKeys()

virtual int32 FNameCurve::GetNumKeys ( ) const
inlinefinaloverridevirtual

◆ SetKeyTime()

void FNameCurve::SetKeyTime ( FKeyHandle  KeyHandle,
float  NewTime 
)
finaloverridevirtual

Move a key to a new time.

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

◆ UpdateOrAddKey()

FKeyHandle FNameCurve::UpdateOrAddKey ( float  InTime,
const FName InValue,
float  KeyTimeTolerance = UE_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.

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

Member Data Documentation

◆ Keys

TArray<FNameCurveKey> FNameCurve::Keys

Sorted array of keys


The documentation for this struct was generated from the following files: