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
(
    EAnimInterpolationType Interpolation,
    int32 NumberOfFrames,
    const uint8 * FrameTable,
    float RelativePos,
    int32 NumKeys,
    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

Interpolation

The Interpolation type of the sequence

NumberOfFrames

The number of frames in the original sequence

FrameTable

The frame table containing a frame index for each key.

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.

Seq

The UAnimSequence container.

FrameTable

The frame table containing a frame index for each key.

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