UGeometryCacheTrack::FindSampleIndexFromTime

FindSampleIndexFromTime uses binary search to find the closest index to Time inside Samples

Windows
MacOS
Linux

References

Module

GeometryCache

Header

/Engine/Plugins/Experimental/GeometryCache/Source/GeometryCache/Classes/GeometryCacheTrack.h

Include

#include "GeometryCacheTrack.h"

Source

/Engine/Plugins/Experimental/GeometryCache/Source/GeometryCache/Private/GeometryCacheTrack.cpp

Syntax

const uint32 FindSampleIndexFromTime
(
    const TArray< float > & SampleTimes,
    const float Time,
    const bool bLooping
)

Remarks

FindSampleIndexFromTime uses binary search to find the closest index to Time inside Samples

Returns

const uint32

Parameters

Parameter

Description

SampleTimes

Array of Sample times used for the search

Time

Time for which the closest index has to be found

bLooping

Whether or not we should fmod Time according to the last entry in SampleTimes

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