AnimEncoding::TimeToIndex

Utility function to determine the two key indices to interpolate given a relative position in the animation

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/AnimEncoding.h

Include

#include "AnimEncoding.h"

Syntax

static float TimeToIndex
(
    float SequenceLength,
    float RelativePos,
    int32 NumKeys,
    EAnimInterpolationType Interpolation,
    int32 & PosIndex0Out,
    int32 & PosIndex1Out
)

Remarks

Utility function to determine the two key indices to interpolate given a relative position in the animation

Utility function to determine the two key indices to interpolate given a relative position in the animation

Returns

The rate at which to interpolate the two keys returned to obtain the final result.

Parameters

Parameter

Description

SequenceLength

The length of the anim sequence

RelativePos

The relative position to solve in the range [0,1] inclusive.

NumKeys

The number of keys present in the track being solved.

Interpolation

The Interpolation type of the sequence

PosIndex0Out

Output value for the closest key index before the RelativePos specified.

PosIndex1Out

Output value for the closest key index after the RelativePos specified.

Seq

The UAnimSequence container.

RelativePos

The relative position to solve in the range [0,1] inclusive.

NumKeys

The number of keys present in the track being solved.

PosIndex0Out

Output value for the closest key index before the RelativePos specified.

PosIndex1Out

Output value for the closest key index after the RelativePos specified.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss