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

#include <RealCurve.h>

+ Inheritance diagram for FRealCurve:

Public Member Functions

 FRealCurve ()
 
bool HasAnyData () const
 
ENGINE_API FKeyHandle FindKey (float KeyTime, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER) const
 
ENGINE_API bool KeyExistsAtTime (float KeyTime, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER) const
 
virtual void SetKeyInterpMode(FKeyHandle KeyHandle, ERichCurveInterpMode NewInterpMode) PURE_VIRTUAL(FRealCurve void SetDefaultValue (float InDefaultValue)
 
float GetDefaultValue () const
 
void ClearDefaultValue ()
 
- 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

virtual FKeyHandle AddKey (float InTime, float InValue, const bool bUnwindRotation=false, FKeyHandle KeyHandle=FKeyHandle()) PURE_VIRTUAL(FRealCurve
 
virtual void virtual DeleteKey(FKeyHandle KeyHandle) PURE_VIRTUAL(FRealCurve FKeyHandle UpdateOrAddKey (float InTime, float InValue, const bool bUnwindRotation=false, float KeyTimeTolerance=UE_KINDA_SMALL_NUMBER) PURE_VIRTUAL(FRealCurve
 
virtual void virtual SetKeyValue(FKeyHandle KeyHandle, float NewValue, bool bAutoSetTangents=true) PURE_VIRTUAL(FRealCurve float GetKeyValue (FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve
 
virtual TPair< float, floatGetKeyTimeValuePair (FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve
 
virtual ERichCurveInterpMode GetKeyInterpMode (FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve
 
virtual void virtual GetTimeRange(float &MinTime, float &MaxTime) const PURE_VIRTUAL(FRealCurve void virtual GetValueRange(float &MinValue, float &MaxValue) const PURE_VIRTUAL(FRealCurve void virtual Reset() PURE_VIRTUAL(FRealCurve void virtual RemapTimeValue(float &InTime, float &CycleValueOffset) const PURE_VIRTUAL(FRealCurve float Eval (float InTime, float InDefaultValue=0.0f) const PURE_VIRTUAL(FRealCurve
 
float DefaultValue
 
TEnumAsByte< ERichCurveExtrapolationPreInfinityExtrap
 
TEnumAsByte< ERichCurveExtrapolationPostInfinityExtrap
 
- 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
 

Static Protected Member Functions

static ENGINE_API void CycleTime (float MinTime, float MaxTime, float &InTime, int &CycleCount)
 

Protected Attributes

virtual int32 GetKeyIndex (float KeyTime, float KeyTimeTolerance) const PURE_VIRTUAL(FRealCurve
 
- Protected Attributes inherited from FIndexedCurve
FKeyHandleMap KeyHandlesToIndices
 

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
 

Detailed Description

A rich, editable float curve

Constructor & Destructor Documentation

◆ FRealCurve()

FRealCurve::FRealCurve ( )
inline

Member Function Documentation

◆ ClearDefaultValue()

void FRealCurve::ClearDefaultValue ( )
inline

Removes the default value for this curve.

◆ CycleTime()

void FRealCurve::CycleTime ( float  MinTime,
float  MaxTime,
float InTime,
int &  CycleCount 
)
staticprotectedvirtual

Resize curve length to the [MinTimeRange, MaxTimeRange] Bake curve given the sample rate Remove redundant keys, comparing against Tolerance (and optional use of sample-rate for additional testing)

◆ FindKey()

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

Finds a key a the specified time

◆ GetDefaultValue()

float FRealCurve::GetDefaultValue ( ) const
inline

Get the default value for the curve

◆ HasAnyData()

bool FRealCurve::HasAnyData ( ) const
inline

Check whether this curve has any data or not

◆ KeyExistsAtTime()

bool FRealCurve::KeyExistsAtTime ( float  KeyTime,
float  KeyTimeTolerance = UE_KINDA_SMALL_NUMBER 
) const

True if a key exists already, false otherwise

◆ SetDefaultValue()

virtual void SetKeyInterpMode(FKeyHandle KeyHandle, ERichCurveInterpMode NewInterpMode) PURE_VIRTUAL(FRealCurve void FRealCurve::SetDefaultValue ( float  InDefaultValue)
inlinevirtual

Set the default value of the curve

Member Data Documentation

◆ AddKey

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

Parameters
bUnwindRotationWhen true, the value will be treated like a rotation value in degrees, and will automatically be unwound to prevent flipping 360 degrees from the previous key
KeyHandleOptionally can specify what handle this new key should have, otherwise, it'll make a new one

◆ DefaultValue

float FRealCurve::DefaultValue

Default value

◆ Eval

virtual void virtual GetTimeRange (float& MinTime, float& MaxTime) const PURE_VIRTUAL(FRealCurve void virtual GetValueRange (float& MinValue, float& MaxValue) const PURE_VIRTUAL(FRealCurve void virtual Reset () PURE_VIRTUAL(FRealCurve void virtual RemapTimeValue (float& InTime, float& CycleValueOffset) const PURE_VIRTUAL(FRealCurve float FRealCurve::Eval(float InTime, float InDefaultValue=0.0f) const PURE_VIRTUAL(FRealCurve

Get range of input time values. Outside this region curve continues constantly the start/end values. Get range of output values. Clear all keys. Remap InTime based on pre and post infinity extrapolation values Evaluate this curve at the specified time

◆ GetKeyIndex

virtual int32 FRealCurve::GetKeyIndex(float KeyTime, float KeyTimeTolerance) const PURE_VIRTUAL(FRealCurve
protected

◆ GetKeyInterpMode

virtual ERichCurveInterpMode FRealCurve::GetKeyInterpMode(FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve

◆ GetKeyTimeValuePair

virtual TPair<float, float> FRealCurve::GetKeyTimeValuePair(FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve

Returns a <Time, Value> pair for the specified key

◆ GetKeyValue

virtual void virtual SetKeyValue (FKeyHandle KeyHandle, float NewValue, bool bAutoSetTangents = true) PURE_VIRTUAL(FRealCurve float FRealCurve::GetKeyValue(FKeyHandle KeyHandle) const PURE_VIRTUAL(FRealCurve

Set the value of the specified key Returns the value of the specified key

◆ PostInfinityExtrap

TEnumAsByte<ERichCurveExtrapolation> FRealCurve::PostInfinityExtrap

Post-infinity extrapolation state

◆ PreInfinityExtrap

TEnumAsByte<ERichCurveExtrapolation> FRealCurve::PreInfinityExtrap

Pre-infinity extrapolation state

◆ UpdateOrAddKey

Remove the specified key from the curve.

Parameters
KeyHandleThe handle of the key to remove.
See also
AddKey, SetKeys 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: