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

#include <IntegralCurve.h>

+ Inheritance diagram for FIntegralCurve:

Public Member Functions

 FIntegralCurve ()
 
virtual ~FIntegralCurve ()
 
virtual int32 GetNumKeys () const override final
 
virtual FIndexedCurveDuplicate () const final
 
ENGINE_API int32 Evaluate (float Time, int32 InDefaultValue=0) const
 
bool HasAnyData () const
 
ENGINE_API TArray< FIntegralKey >::TConstIterator GetKeyIterator () const
 
ENGINE_API FKeyHandle AddKey (float InTime, int32 InValue, FKeyHandle KeyHandle=FKeyHandle())
 
ENGINE_API void DeleteKey (FKeyHandle KeyHandle)
 
ENGINE_API FKeyHandle UpdateOrAddKey (float InTime, int32 Value, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER)
 
virtual ENGINE_API void SetKeyTime (FKeyHandle KeyHandle, float NewTime) override final
 
virtual ENGINE_API float GetKeyTime (FKeyHandle KeyHandle) const override final
 
ENGINE_API void SetKeyValue (FKeyHandle KeyHandle, int32 NewValue)
 
ENGINE_API int32 GetKeyValue (FKeyHandle KeyHandle) const
 
void SetDefaultValue (int32 InDefaultValue)
 
int32 GetDefaultValue () const
 
void ClearDefaultValue ()
 
void SetUseDefaultValueBeforeFirstKey (bool InbUseDefaultValueBeforeFirstKey)
 
bool GetUseDefaultValueBeforeFirstKey () const
 
ENGINE_API FIntegralKeyGetKey (FKeyHandle KeyHandle)
 
ENGINE_API FIntegralKey GetKey (FKeyHandle KeyHandle) const
 
ENGINE_API FKeyHandle FindKey (float KeyTime, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER) const
 
ENGINE_API FKeyHandle FindKeyBeforeOrAt (float KeyTime) const
 
ENGINE_API void RemoveRedundantKeys ()
 
- 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)
 

Additional Inherited Members

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

An integral curve, which holds the key time and the key value

Constructor & Destructor Documentation

◆ FIntegralCurve()

FIntegralCurve::FIntegralCurve ( )
inline

Default constructor.

◆ ~FIntegralCurve()

virtual FIntegralCurve::~FIntegralCurve ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ AddKey()

FKeyHandle FIntegralCurve::AddKey ( float  InTime,
int32  InValue,
FKeyHandle  KeyHandle = FKeyHandle() 
)

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

Parameters
KeyHandleOptionally can specify what handle this new key should have, otherwise, it'll make a new one
Returns
The handle of the new key

◆ ClearDefaultValue()

void FIntegralCurve::ClearDefaultValue ( )
inline

Removes the default value for this curve.

◆ DeleteKey()

void FIntegralCurve::DeleteKey ( FKeyHandle  KeyHandle)

Remove the specified key from the curve.

◆ Duplicate()

virtual FIndexedCurve * FIntegralCurve::Duplicate ( ) const
inlinefinalvirtual

Allocates a duplicate of the curve

◆ Evaluate()

int32 FIntegralCurve::Evaluate ( float  Time,
int32  InDefaultValue = 0 
) const

Evaluates the value of an array of keys at a time

◆ FindKey()

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

◆ FindKeyBeforeOrAt()

FKeyHandle FIntegralCurve::FindKeyBeforeOrAt ( float  KeyTime) const

Gets the handle for the last key which is at or before the time requested. If there are no keys at or before the requested time, an invalid handle is returned.

◆ GetDefaultValue()

int32 FIntegralCurve::GetDefaultValue ( ) const
inline

Get the default value for the curve

◆ GetKey() [1/2]

FIntegralKey & FIntegralCurve::GetKey ( FKeyHandle  KeyHandle)

Functions for getting keys based on handles

◆ GetKey() [2/2]

FIntegralKey FIntegralCurve::GetKey ( FKeyHandle  KeyHandle) const

◆ GetKeyIterator()

TArray< FIntegralKey >::TConstIterator FIntegralCurve::GetKeyIterator ( ) const

Const iterator for the keys, so the indices and handles stay valid

◆ GetKeyTime()

float FIntegralCurve::GetKeyTime ( FKeyHandle  KeyHandle) const
finaloverridevirtual

Get the time for the Key with the specified index.

◆ GetKeyValue()

int32 FIntegralCurve::GetKeyValue ( FKeyHandle  KeyHandle) const

Get the value for the Key with the specified index.

◆ GetNumKeys()

virtual int32 FIntegralCurve::GetNumKeys ( ) const
inlinefinaloverridevirtual

Get number of keys in curve.

◆ GetUseDefaultValueBeforeFirstKey()

bool FIntegralCurve::GetUseDefaultValueBeforeFirstKey ( ) const
inline

Gets whether or not the default value should be used for evaluation for time values before the first key.

◆ HasAnyData()

bool FIntegralCurve::HasAnyData ( ) const
inline

Check whether this curve has any data or not

◆ RemoveRedundantKeys()

void FIntegralCurve::RemoveRedundantKeys ( )

Tries to reduce the number of keys required for accurate evaluation (zero error threshold)

◆ SetDefaultValue()

void FIntegralCurve::SetDefaultValue ( int32  InDefaultValue)
inline

Set the default value for the curve

◆ SetKeyTime()

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

Move a key to a new time.

◆ SetKeyValue()

void FIntegralCurve::SetKeyValue ( FKeyHandle  KeyHandle,
int32  NewValue 
)

Set the value of the key with the specified index.

◆ SetUseDefaultValueBeforeFirstKey()

void FIntegralCurve::SetUseDefaultValueBeforeFirstKey ( bool  InbUseDefaultValueBeforeFirstKey)
inline

Sets whether or not the default value should be used for evaluation for time values before the first key.

◆ UpdateOrAddKey()

FKeyHandle FIntegralCurve::UpdateOrAddKey ( float  InTime,
int32  Value,
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


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