FRichCurve

A rich, editable float curve

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Curves/RichCurve.h

Include

#include "Curves/RichCurve.h"

Syntax

struct FRichCurve : public FRealCurve

Remarks

A rich, editable float curve

Variables

Name Description

Public variable

TArray< FRichCu...

 

Keys

Sorted array of keys

Functions

Name Description

Public function

void

 

AutoSetTangents

(
    float Tension
)

Auto set tangents for any 'auto' keys in curve

Public function Const

void

 

CompressCurve

(
    FCompressedRichCurve& OutCurve,
    float ErrorThreshold,
    float SampleRate
)

Compresses a rich curve for efficient runtime storage and evaluation

Public function Const

const TArray...

 

GetConstRefOfKeys()

Gets a const reference of the keys, so indices and handles can't be meddled with

Public function Const

TArray< FRic...

 

GetCopyOfKeys()

Gets a copy of the keys, so indices and handles can't be meddled with

Public function Const

FRichCurveKe...

 

GetFirstKey()

Quick accessors for the first and last keys

Public function

FRichCurveKe...

 

GetFirstMatchingKey

(
    const TArray< FKeyHandle >& KeyHan...
)

Get the first key that matches any of the given key handles.

Public function

FRichCurveKe...

 

GetKey

(
    FKeyHandle KeyHandle
)

Functions for getting keys based on handles

Public function Const

FRichCurveKe...

 

GetKey

(
    FKeyHandle KeyHandle
)

Functions for getting keys based on handles

Public function Const

TArray< FRic...

 

GetKeyIterator()

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

Public function Const

const FRichC...

 

GetKeyRef

(
    FKeyHandle KeyHandle
)

Functions for getting keys based on handles

Public function Const

ERichCurveTa...

 

GetKeyTangentMode

(
    FKeyHandle KeyHandle
)

Get the tangent mode of the specified key

Public function Const

FRichCurveKe...

 

GetLastKey()

Public function Const

bool

 

IsConstant

(
    float Tolerance
)

Returns whether the curve is constant or not

Public function Const

bool

 

IsEmpty()

Returns whether the curve is empty or not

Public function

void

 

SetKeyInterpMode

(
    FKeyHandle KeyHandle,
    ERichCurveInterpMode NewInterpMode,
    bool bAutoSetTangents
)

Public function

void

 

SetKeys

(
    const TArray< FRichCurveKey >& InK...
)

Sets the keys with the keys.

Expects that the keys are already sorted.

Public function

void

 

SetKeyTangentMode

(
    FKeyHandle KeyHandle,
    ERichCurveTangentMode NewTangentMod...,
    bool bAutoSetTangents
)

Set the tangent mode of the specified key

Public function

void

 

SetKeyTangentWeightMode

(
    FKeyHandle KeyHandle,
    ERichCurveTangentWeightMode NewTang...,
    bool bAutoSetTangents
)

Set the tangent weight mode of the specified key

Overridden from FRealCurve

Name Description

Public function Virtual

FKeyHandle

 

AddKey

(
    float InTime,
    float InValue,
    const bool bUnwindRotation,
    FKeyHandle KeyHandle
)

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

Public function Virtual

void

 

BakeCurve

(
    float SampleRate,
    float FirstKeyTime,
    float LastKeyTime
)

Public function Virtual

void

 

BakeCurve

(
    float SampleRate
)

Bake curve given the sample rate

Public function Virtual

void

 

DeleteKey

(
    FKeyHandle KeyHandle
)

Remove the specified key from the curve.

Public function Virtual Const

float

 

Eval

(
    float InTime,
    float InDefaultValue
)

Evaluate this rich curve at the specified time

Public function Virtual Const

ERichCurveIn...

 

GetKeyInterpMode

(
    FKeyHandle KeyHandle
)

Get the interp mode of the specified key

Public function Virtual Const

TPair< float...

 

GetKeyTimeValuePair

(
    FKeyHandle KeyHandle
)

Returns a pair for the specified key

Public function Virtual Const

float

 

GetKeyValue

(
    FKeyHandle KeyHandle
)

Returns the value of the specified key

Public function Virtual Const

void

 

GetTimeRange

(
    float& MinTime,
    float& MaxTime
)

Get range of input time values.

Public function Virtual Const

void

 

GetValueRange

(
    float& MinValue,
    float& MaxValue
)

Get range of output values.

Public function Virtual

void

 

ReadjustTimeRange

(
    float NewMinTimeRange,
    float NewMaxTimeRange,
    bool bInsert,
    float OldStartTime,
    float OldEndTime
)

Resize curve length to the [MinTimeRange, MaxTimeRange]

Public function Virtual Const

void

 

RemapTimeValue

(
    float& InTime,
    float& CycleValueOffset
)

Remap InTime based on pre and post infinity extrapolation values

Public function Virtual

void

 

RemoveRedundantKeys

(
    float Tolerance
)

Remove redundant keys, comparing against Tolerance

Public function Virtual

void

 

RemoveRedundantKeys

(
    float Tolerance,
    float FirstKeyTime,
    float LastKeyTime
)

Public function Virtual

void

 

Reset()

Clear all keys.

Public function Virtual

void

 

SetKeyInterpMode

(
    FKeyHandle KeyHandle,
    ERichCurveInterpMode NewInterpMode
)

Set the interp mode of the specified key

Public function Virtual

void

 

SetKeyValue

(
    FKeyHandle KeyHandle,
    float NewValue,
    bool bAutoSetTangents
)

Set the value of the specified key

Public function Virtual

FKeyHandle

 

UpdateOrAddKey

(
    float InTime,
    float InValue,
    const bool bUnwindRotation,
    float KeyTimeTolerance
)

Finds the key at InTime, and updates its value.

Overridden from FIndexedCurve

Name Description

Public function Virtual Const

FIndexedCurv...

 

Duplicate()

Allocates a duplicate of the curve

Public function Virtual Const

float

 

GetKeyTime

(
    FKeyHandle KeyHandle
)

Get the time for the Key with the specified index.

Public function Virtual Const

int32

 

GetNumKeys()

Get number of keys in curve.

Public function Virtual

void

 

SetKeyTime

(
    FKeyHandle KeyHandle,
    float NewTime
)

Move a key to a new time.

Operators

Name Description

Public function Const

bool

 

operator==

(
    const FRichCurve& Curve
)

Determine if two RichCurves are the same