7#ifndef PXR_USD_IMAGING_USD_EXEC_IMAGING_COMPUTED_DATA_SOURCE_H
8#define PXR_USD_IMAGING_USD_EXEC_IMAGING_COMPUTED_DATA_SOURCE_H
14#include "pxr/usdImaging/usdExecImaging/api.h"
18#include "pxr/base/vt/value.h"
19#include "pxr/imaging/hd/dataSource.h"
23PXR_NAMESPACE_OPEN_SCOPE
35 using Time = HdSampledDataSource::Time;
39 UsdExecImagingRequestAccessorSharedPtr requestAccessor,
43 VtValue GetValue(Time shutterOffset)
const;
46 bool GetContributingSampleTimesForInterval(
49 std::vector<Time> * outSampleTimes)
const;
52 UsdExecImagingRequestAccessorSharedPtr _requestAccessor;
70 return _impl.GetValue(shutterOffset);
76 std::vector<Time> *outSampleTimes)
override {
77 return _impl.GetContributingSampleTimesForInterval(
78 startTime, endTime, outSampleTimes);
83 UsdExecImagingRequestAccessorSharedPtr requestAccessor,
85 : _impl(
std::move(requestAccessor),
std::move(valueKey))
97template <
class ValueType>
102 HD_DECLARE_DATASOURCE(
105 using Time = HdSampledDataSource::Time;
108 return _impl.GetValue(shutterOffset);
112 return _impl.GetValue(shutterOffset).template Get<ValueType>();
118 std::vector<Time> *outSampleTimes)
override {
119 return _impl.GetContributingSampleTimesForInterval(
120 startTime, endTime, outSampleTimes);
125 UsdExecImagingRequestAccessorSharedPtr requestAccessor,
127 : _impl(
std::move(requestAccessor),
std::move(valueKey))
134PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing time-sampled values.
A datasource representing a concretely-typed sampled value.
Common implementation for data sources that produce exec-computed values.
An HdSampledDataSource that produces exec-computed values.
bool GetContributingSampleTimesForInterval(Time startTime, Time endTime, std::vector< Time > *outSampleTimes) override
Given a shutter window of interest (startTime and endTime relative to the current frame),...
VtValue GetValue(Time shutterOffset) override
Returns the value of this data source at frame-relative time shutterOffset.
An HdTypedSampledDataSource that produces exec-computed values.
bool GetContributingSampleTimesForInterval(Time startTime, Time endTime, std::vector< Time > *outSampleTimes) override
Given a shutter window of interest (startTime and endTime relative to the current frame),...
VtValue GetValue(Time shutterOffset) override
Returns the value of this data source at frame-relative time shutterOffset.
ValueType GetTypedValue(Time shutterOffset) override
Returns the value of this data source at frame-relative time shutterOffset, as type T.
Identifies a value that is computed by exec.
Provides a container which may hold any type, and provides introspection and iteration over array typ...