UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TKeyFrameManipulator< TimeType > Class Template Reference

#include <KeyFrameManipulator.h>

+ Inheritance diagram for TKeyFrameManipulator< TimeType >:

Public Types

typedef TCallTraits< TimeType >::ParamType TimeTypeRef
 

Public Member Functions

 TKeyFrameManipulator (TArray< TimeType > *KeyTimesParam, FKeyHandleLookupTable *ExternalKeyHandleLUT=nullptr)
 
 TKeyFrameManipulator (const TKeyFrameManipulator &Rhs)
 
TKeyFrameManipulatoroperator= (const TKeyFrameManipulator &Rhs)
 
 TKeyFrameManipulator (TKeyFrameManipulator &&Rhs)
 
TKeyFrameManipulatoroperator= (TKeyFrameManipulator &&Rhs)
 
virtual ~TKeyFrameManipulator ()
 
FKeyHandle AddKey (TimeTypeRef InTime)
 
void SetKeyTime (FKeyHandle KeyHandle, TimeTypeRef NewTime)
 
void RemoveKey (FKeyHandle KeyHandle)
 
void Reset ()
 
TOptional< TimeTypeGetKeyTime (FKeyHandle KeyHandle) const
 
TOptional< FKeyHandleFindKey (const TFunctionRef< bool(TimeTypeRef)> &InPredicate) const
 
TKeyTimeIterator< TimeTypeIterateKeys () const
 

Protected Member Functions

int32 ComputeInsertIndex (TimeTypeRef InTime, int32 StartAtIndex=0) const
 
FKeyHandle InsertKeyImpl (TimeTypeRef Time, int32 InsertIndex) const
 
TimeType GetKeyTimeChecked (int32 KeyIndex) const
 
int32 GetIndex (FKeyHandle KeyHandle) const
 
FKeyHandle GetKeyHandleFromIndex (int32 Index) const
 
void RelocateKeyImpl (int32 OldIndex, int32 NewIndex)
 

Detailed Description

template<typename TimeType>
class TKeyFrameManipulator< TimeType >

Templated key frame manipulator that knows how to add, remove and (re)arrange key times. Guarantees that any manipulation of a previously sorted time array, will remain sorted.

Member Typedef Documentation

◆ TimeTypeRef

template<typename TimeType >
typedef TCallTraits<TimeType>::ParamType TKeyFrameManipulator< TimeType >::TimeTypeRef

Constructor & Destructor Documentation

◆ TKeyFrameManipulator() [1/3]

template<typename TimeType >
TKeyFrameManipulator< TimeType >::TKeyFrameManipulator ( TArray< TimeType > *  KeyTimesParam,
FKeyHandleLookupTable ExternalKeyHandleLUT = nullptr 
)
inline

Construction from an externally owned array of times

◆ TKeyFrameManipulator() [2/3]

◆ TKeyFrameManipulator() [3/3]

◆ ~TKeyFrameManipulator()

Member Function Documentation

◆ AddKey()

template<typename TimeType >
FKeyHandle TKeyFrameManipulator< TimeType >::AddKey ( TimeTypeRef  InTime)
inline

Add a new key time to the data structure

Parameters
InTimeThe value of the time to add
Returns
A key handle for the new key

◆ ComputeInsertIndex()

template<typename TimeType >
int32 TKeyFrameManipulator< TimeType >::ComputeInsertIndex ( TimeTypeRef  InTime,
int32  StartAtIndex = 0 
) const
inlineprotected

Calculate the index at which to insert the given time such that the container remains sorted

◆ FindKey()

template<typename TimeType >
TOptional< FKeyHandle > TKeyFrameManipulator< TimeType >::FindKey ( const TFunctionRef< bool(TimeTypeRef)> &  InPredicate) const
inline

Attempt to find a key using a custom predicate

Parameters
InPredicatePredicate function to use when searching
Returns
The key's handle if found, or an empty container if not

◆ GetIndex()

template<typename TimeType >
int32 TKeyFrameManipulator< TimeType >::GetIndex ( FKeyHandle  KeyHandle) const
inlineprotected

Get the index that corresponds to the specified key handle

◆ GetKeyHandleFromIndex()

template<typename TimeType >
FKeyHandle TKeyFrameManipulator< TimeType >::GetKeyHandleFromIndex ( int32  Index) const
inlineprotected

Get the handle that corresponds to the specified index

◆ GetKeyTime()

template<typename TimeType >
TOptional< TimeType > TKeyFrameManipulator< TimeType >::GetKeyTime ( FKeyHandle  KeyHandle) const
inline

Get the time that corresponds to the specified key handle

Parameters
KeyHandleHandle to the key to get the time for.
Returns
The time that this key exists at, or an empty container if it was not found

◆ GetKeyTimeChecked()

template<typename TimeType >
TimeType TKeyFrameManipulator< TimeType >::GetKeyTimeChecked ( int32  KeyIndex) const
inlineprotected

Get the time of the specified key index. Index is assumed to be valid.

◆ InsertKeyImpl()

template<typename TimeType >
FKeyHandle TKeyFrameManipulator< TimeType >::InsertKeyImpl ( TimeTypeRef  Time,
int32  InsertIndex 
) const
inlineprotected

Insert the specified time into our container at the specified index

◆ IterateKeys()

template<typename TimeType >
TKeyTimeIterator< TimeType > TKeyFrameManipulator< TimeType >::IterateKeys ( ) const
inline

Iterate the times stored in the external data structure

Returns
An iterator that iterates the keys in order, and can optionally supply handles

◆ operator=() [1/2]

template<typename TimeType >
TKeyFrameManipulator & TKeyFrameManipulator< TimeType >::operator= ( const TKeyFrameManipulator< TimeType > &  Rhs)
inline

◆ operator=() [2/2]

◆ RelocateKeyImpl()

template<typename TimeType >
void TKeyFrameManipulator< TimeType >::RelocateKeyImpl ( int32  OldIndex,
int32  NewIndex 
)
inlineprotected

Move a key from one index to another

◆ RemoveKey()

template<typename TimeType >
void TKeyFrameManipulator< TimeType >::RemoveKey ( FKeyHandle  KeyHandle)
inline

Remove a key that corresponds to the specified key handle

Parameters
KeyHandleHandle to the key to remove

◆ Reset()

template<typename TimeType >
void TKeyFrameManipulator< TimeType >::Reset ( )
inline

Removes all keys.

◆ SetKeyTime()

template<typename TimeType >
void TKeyFrameManipulator< TimeType >::SetKeyTime ( FKeyHandle  KeyHandle,
TimeTypeRef  NewTime 
)
inline

Set the time for a key that corresponds to the specified key handle

Parameters
KeyHandleHandle to the key to set the time for
NewTimeThe time to assign to this key

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