8 #ifndef PXR_BASE_TS_TYPES_H
9 #define PXR_BASE_TS_TYPES_H
29 #define TS_SPLINE_SUPPORTED_VALUE_TYPES \
34 #define TS_SPLINE_SAMPLE_VERTEX_TYPES \
39 #define TS_SPLINE_VALUE_TYPE_NAME(x) TF_PP_TUPLE_ELEM(0, x)
40 #define TS_SPLINE_VALUE_CPP_TYPE(x) TF_PP_TUPLE_ELEM(1, x)
47 #define _TS_SUPPORT_DATA_TYPE(unused, tuple) \
49 inline constexpr bool \
50 TsSplineIsValidDataType< TS_SPLINE_VALUE_CPP_TYPE(tuple) > = true;
54 #undef _TS_SUPPORT_DATA_TYPE
60 TsSplineIsValidSampleType =
false;
62 #define _TS_SUPPORT_SAMPLE_TYPE(unused, tuple) \
64 inline constexpr bool \
65 TsSplineIsValidSampleType< TS_SPLINE_VALUE_CPP_TYPE(tuple) > = true;
69 #undef _TS_SUPPORT_SAMPLE_TYPE
72 using TsTime = double;
253 template <
typename Vertex>
257 static_assert(TsSplineIsValidSampleType<Vertex>,
258 "The Vertex template parameter to TsSplineSamples must be one"
259 " of GfVec2d, GfVec2f, or GfVec2h.");
276 template <
typename Vertex>
280 static_assert(TsSplineIsValidSampleType<Vertex>,
281 "The Vertex template parameter to TsSplineSamplesWithSources"
282 " must be one of GfVec2d, GfVec2f, or GfVec2h.");
TsSplineSamplesWithSources<Vertex> is a TsSplineSamples<Vertex> that also includes source information...
TS_API GfInterval GetLoopedInterval() const
Returns the union of the prototype region and the echo region(s).
std::vector< Vertex > Polyline
#define PXR_NAMESPACE_OPEN_SCOPE
TF_PP_SEQ_FOR_EACH(_TS_SUPPORT_DATA_TYPE,~, TS_SPLINE_SUPPORTED_VALUE_TYPES) template< class T > inline const expr bool TsSplineIsValidSampleType
True if template parameter T is a supported spline sampling vertex type.
TS_API bool operator!=(const TsLoopParams &other) const
std::vector< Polyline > polylines
#define TS_SPLINE_SAMPLE_VERTEX_TYPES
TS_API GfInterval GetPrototypeInterval() const
Returns the prototype region, [protoStart, protoEnd).
std::vector< TsSplineSampleSource > sources
#define PXR_NAMESPACE_CLOSE_SCOPE
TS_API bool operator==(const TsLoopParams &other) const
std::vector< Polyline > polylines
#define TS_SPLINE_SUPPORTED_VALUE_TYPES
TsSplineSamples<Vertex> holds a collection of piecewise linear polylines that approximate a TsSpline...
#define _TS_SUPPORT_DATA_TYPE(unused, tuple)
std::vector< Vertex > Polyline
constexpr bool TsSplineIsValidDataType
True if template parameter T is a supported spline data type.
#define _TS_SUPPORT_SAMPLE_TYPE(unused, tuple)