|
A datasource representing time-sampled values. More...
#include <dataSource.h>
Public Types | |
using | Time = float |
Public Member Functions | |
HD_DECLARE_DATASOURCE_ABSTRACT (HdSampledDataSource) | |
virtual VtValue | GetValue (Time shutterOffset)=0 |
Returns the value of this data source at frame-relative time shutterOffset . | |
virtual bool | GetContributingSampleTimesForInterval (Time startTime, Time endTime, std::vector< Time > *outSampleTimes)=0 |
Given a shutter window of interest (startTime and endTime relative to the current frame), return a list of sample times for the caller to query with GetValue such that the caller can reconstruct the signal over the shutter window. | |
A datasource representing time-sampled values.
Note that implementations are responsible for providing cache invalidation, if necessary.
Definition at line 152 of file dataSource.h.
using Time = float |
Definition at line 156 of file dataSource.h.
|
pure virtual |
Given a shutter window of interest (startTime
and endTime
relative to the current frame), return a list of sample times for the caller to query with GetValue such that the caller can reconstruct the signal over the shutter window.
For a sample-based attribute, this might be a list of times when samples are defined. For a procedural scene, this might be a generated distribution. Note that the returned samples don't need to be within startTime
and endTime
; if a boundary sample is outside of the window, implementers can return it, and callers should expect it and interpolate to startTime
or endTime
accordingly. If this call returns true
, the caller is expected to pass the list of outSampleTimes
to GetValue
. If this call returns false
, this value is uniform across the shutter window and the caller should call GetValue(0)
to get that uniform value.
Implemented in HdRetainedSampledDataSource, HdRetainedTypedSampledDataSource< T >, UsdImagingDataSourceAttributeColorSpace, UsdImagingDataSourcePointInstancerMask, UsdImagingDataSourceExtentCoordinate, UsdImagingDataSourceXformResetXformStack, UsdImagingDataSourceXformMatrix, and UsdImagingDataSourceRelationship.
|
pure virtual |
Returns the value of this data source at frame-relative time shutterOffset
.
The caller does not track the frame; the scene index producing this datasource is responsible for that, if applicable. Note that, although this call returns a VtValue for each shutter offset, the type of the held value is expected to be the same across all shutter offsets. This call is expected to be threadsafe.
Implemented in HdRetainedSampledDataSource, HdRetainedTypedSampledDataSource< T >, UsdImagingDataSourceAttributeColorSpace, UsdImagingDataSourcePointInstancerMask, UsdImagingDataSourceExtentCoordinate, UsdImagingDataSourceXformResetXformStack, UsdImagingDataSourceXformMatrix, and UsdImagingDataSourceRelationship.