Open 3D Engine EMotionFX Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <KeyFrameFinder.h>
Public Member Functions | |
KeyFrameFinder () | |
~KeyFrameFinder () | |
Static Public Member Functions | |
static size_t | FindKey (float timeValue, const KeyFrame< ReturnType, StorageType > *keyTrack, size_t numKeys) |
The keyframe finder. This is used to quickly locate the two keys inside the keytrack to interpolate between. For example if there is a keyframe at every second, and we want to calculate a value at time 5.6, then we need to interpolate between the key with the time 5 and the key with the time 6. This class basically uses a kd-tree to perform the search. It quickly culls out parts of the keys which cannot be the one which we are searching for. This means the search times are linear, no matter how many keys we are searching.
KeyFrameFinder::KeyFrameFinder | ( | ) |
The constructor.
KeyFrameFinder::~KeyFrameFinder | ( | ) |
The destructor.
|
static |
Locates the key number to use for interpolation at a given time value. You will interpolate between the returned keyframe number and the one after that.
timeValue | The time value you want to calculate a value at. |
keyTrack | The keyframe array to perform the search on. |
numKeys | The number of keyframes stored inside the keyTrack parameter buffer. |