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;
220 template <
typename Vertex>
224 static_assert(TsSplineIsValidSampleType<Vertex>,
225 "The Vertex template parameter to TsSplineSamples must be one"
226 " of GfVec2d, GfVec2f, or GfVec2h.");
243 template <
typename Vertex>
247 static_assert(TsSplineIsValidSampleType<Vertex>,
248 "The Vertex template parameter to TsSplineSamplesWithSources"
249 " must be one of GfVec2d, GfVec2f, or GfVec2h.");
259 #define TS_SAMPLE_EXTERN_IMPL(unused, tuple) \
260 TS_API_TEMPLATE_CLASS( \
261 TsSplineSamples< TS_SPLINE_VALUE_CPP_TYPE(tuple) >); \
262 TS_API_TEMPLATE_CLASS( \
263 TsSplineSamplesWithSources< TS_SPLINE_VALUE_CPP_TYPE(tuple) >);
265 #undef TS_SAMPLE_EXTERN_IMPL
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
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).
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
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
#define TS_SAMPLE_EXTERN_IMPL(unused, tuple)
constexpr bool TsSplineIsValidDataType
True if template parameter T is a supported spline data type.
#define _TS_SUPPORT_SAMPLE_TYPE(unused, tuple)