8#ifndef PXR_BASE_TS_TS_TEST_SPLINE_DATA_H
9#define PXR_BASE_TS_TS_TEST_SPLINE_DATA_H
12#include "pxr/base/ts/api.h"
17PXR_NAMESPACE_OPEN_SCOPE
22class TsTest_SplineData
55 FeatureHeldSegments = 1 << 0,
56 FeatureLinearSegments = 1 << 1,
57 FeatureBezierSegments = 1 << 2,
58 FeatureHermiteSegments = 1 << 3,
59 FeatureAutoTangents = 1 << 4,
60 FeatureDualValuedKnots = 1 << 5,
61 FeatureInnerLoops = 1 << 6,
62 FeatureExtrapolatingLoops = 1 << 7,
63 FeatureExtrapolatingSlopes = 1 << 8
65 using Features =
unsigned int;
71 InterpMethod nextSegInterpMethod = InterpHeld;
73 bool isDualValued =
false;
80 bool postAuto =
false;
85 const Knot &other)
const;
89 const Knot &other)
const;
93 const Knot &other)
const;
95 using KnotSet = std::set<Knot>;
119 struct InnerLoopParams
121 bool enabled =
false;
122 double protoStart = 0;
125 int numPostLoops = 0;
126 double valueOffset = 0;
131 const InnerLoopParams &other)
const;
135 const InnerLoopParams &other)
const;
138 bool IsValid()
const;
144 ExtrapMethod method = ExtrapHeld;
146 LoopMode loopMode = LoopNone;
153 Extrapolation(ExtrapMethod method);
157 const Extrapolation &other)
const;
161 const Extrapolation &other)
const;
167 const TsTest_SplineData &other)
const;
171 const TsTest_SplineData &other)
const;
174 void SetIsHermite(
bool hermite);
182 const KnotSet &knots);
185 void SetPreExtrapolation(
186 const Extrapolation &preExtrap);
189 void SetPostExtrapolation(
190 const Extrapolation &postExtrap);
193 void SetInnerLoopParams(
194 const InnerLoopParams ¶ms);
197 bool GetIsHermite()
const;
205 GetPreExtrapolation()
const;
209 GetPostExtrapolation()
const;
212 const InnerLoopParams&
213 GetInnerLoopParams()
const;
216 Features GetRequiredFeatures()
const;
219 std::string GetDebugDescription(
int precision = 6)
const;
222 bool _isHermite =
false;
224 Extrapolation _preExtrap;
225 Extrapolation _postExtrap;
226 InnerLoopParams _innerLoopParams;
229PXR_NAMESPACE_CLOSE_SCOPE