HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
composeTimeSampleSeries.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/base/gf/math.h"
+ Include dependency graph for composeTimeSampleSeries.h:

Go to the source code of this file.

Functions

template<class Iter , class GetTimeFn , class GetValueFn , class ComposeFn , class OutputFn , class TimesEqualFn = decltype(Sdf_timesEqualDefaultFn)>
void SdfComposeTimeSampleSeries (Iter strongBegin, Iter strongEnd, Iter weakBegin, Iter weakEnd, GetTimeFn const &getTime, GetValueFn const &getValue, ComposeFn const &composeFn, OutputFn const &outputFn, TimesEqualFn const &timesEqual=Sdf_timesEqualDefaultFn)
 

Variables

PXR_NAMESPACE_OPEN_SCOPE auto Sdf_timesEqualDefaultFn
 

Function Documentation

template<class Iter , class GetTimeFn , class GetValueFn , class ComposeFn , class OutputFn , class TimesEqualFn = decltype(Sdf_timesEqualDefaultFn)>
void SdfComposeTimeSampleSeries ( Iter  strongBegin,
Iter  strongEnd,
Iter  weakBegin,
Iter  weakEnd,
GetTimeFn const &  getTime,
GetValueFn const &  getValue,
ComposeFn const &  composeFn,
OutputFn const &  outputFn,
TimesEqualFn const &  timesEqual = Sdf_timesEqualDefaultFn 
)

A helper function for composing a stronger time-sample series (times & values) over a weaker one. This is mostly used as an implementation detail.

Compose the [strongBegin, strongEnd) series over [weakBegin, weakEnd). The elements of each series must have an associated Time (double-valued) and Value (arbitrary), fetched by the getTime(Iter) and getValue(Iter) functions respectively. Iter must be a bidirectional iterator.

The composeFn(strong, weak) must accept two Values (as obtained by getValue()) and return a std::optional<Value>. If the optional has a value it is used as the result of composing the values, otherwise the strong value is used.

The outputFn(Value, Time) is called to emit the results of the composition. This function is always called with strictly increasing Times.

The timesEqual(Time, Time) function can optionally be supplied to check Time equivalence with a customized epsilon. The default calls GfIsClose with an epsilon of 1e-6.

Definition at line 47 of file composeTimeSampleSeries.h.

Variable Documentation

PXR_NAMESPACE_OPEN_SCOPE auto Sdf_timesEqualDefaultFn
inline
Initial value:
= [](double t1, double t2) {
return GfIsClose(t1, t2, 1e-6);
}
bool GfIsClose(GfColor const &c1, GfColor const &c2, double tolerance)
Definition: color.h:114

Definition at line 17 of file composeTimeSampleSeries.h.