HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
keyFrameUtils.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/ts/api.h"
#include "pxr/base/ts/types.h"
#include "pxr/base/ts/loopParams.h"
+ Include dependency graph for keyFrameUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const TsKeyFrameTs_GetClosestKeyFrame (const TsKeyFrameMap &keyframes, const TsTime targetTime)
 Finds the keyframe in keyframes closest to the given time. Returns NULL if there are no keyframes. More...
 
const TsKeyFrameTs_GetClosestKeyFrameBefore (const TsKeyFrameMap &keyframes, const TsTime targetTime)
 Finds the closest keyframe in keyframes before the given time. Returns NULL if no such keyframe exists. More...
 
const TsKeyFrameTs_GetClosestKeyFrameAfter (const TsKeyFrameMap &keyframes, const TsTime targetTime)
 Finds the closest keyframe in keyframes after the given time. Returns NULL if no such keyframe exists. More...
 
std::pair< const TsKeyFrame
*, const TsKeyFrame * > 
Ts_GetClosestKeyFramesSurrounding (const TsKeyFrameMap &keyframes, const TsTime targetTime)
 Equivalant to calling Ts_GetClosestKeyFrameBefore and Ts_GetClosestKeyFrameAfter, but twice the speed; for performance critical applications. More...
 
bool Ts_IsSegmentFlat (const TsKeyFrame &kf1, const TsKeyFrame &kf2)
 Returns true if the segment between the given (adjacent) key frames is flat. More...
 
bool Ts_IsKeyFrameRedundant (const TsKeyFrameMap &keyframes, const TsKeyFrame &keyFrame, const TsLoopParams &loopParams=TsLoopParams(), const VtValue &defaultValue=VtValue())
 Returns true if the given key frame is redundant. More...
 
TS_API Ts_DataTs_GetKeyFrameData (TsKeyFrame &kf)
 
TS_API Ts_Data const * Ts_GetKeyFrameData (TsKeyFrame const &kf)
 
bool Ts_IsClose (const VtValue &v0, const VtValue &v1)
 

Function Documentation

const TsKeyFrame* Ts_GetClosestKeyFrame ( const TsKeyFrameMap keyframes,
const TsTime  targetTime 
)

Finds the keyframe in keyframes closest to the given time. Returns NULL if there are no keyframes.

const TsKeyFrame* Ts_GetClosestKeyFrameAfter ( const TsKeyFrameMap keyframes,
const TsTime  targetTime 
)

Finds the closest keyframe in keyframes after the given time. Returns NULL if no such keyframe exists.

const TsKeyFrame* Ts_GetClosestKeyFrameBefore ( const TsKeyFrameMap keyframes,
const TsTime  targetTime 
)

Finds the closest keyframe in keyframes before the given time. Returns NULL if no such keyframe exists.

std::pair<const TsKeyFrame *, const TsKeyFrame *> Ts_GetClosestKeyFramesSurrounding ( const TsKeyFrameMap keyframes,
const TsTime  targetTime 
)

Equivalant to calling Ts_GetClosestKeyFrameBefore and Ts_GetClosestKeyFrameAfter, but twice the speed; for performance critical applications.

TS_API Ts_Data* Ts_GetKeyFrameData ( TsKeyFrame kf)
TS_API Ts_Data const* Ts_GetKeyFrameData ( TsKeyFrame const &  kf)
bool Ts_IsClose ( const VtValue v0,
const VtValue v1 
)
bool Ts_IsKeyFrameRedundant ( const TsKeyFrameMap keyframes,
const TsKeyFrame keyFrame,
const TsLoopParams loopParams = TsLoopParams(),
const VtValue defaultValue = VtValue() 
)

Returns true if the given key frame is redundant.

bool Ts_IsSegmentFlat ( const TsKeyFrame kf1,
const TsKeyFrame kf2 
)

Returns true if the segment between the given (adjacent) key frames is flat.