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;
89 const Knot &other)
const;
91 const Knot &other)
const;
93 const Knot &other)
const;
95 using KnotSet = std::set<Knot>;
131 struct TS_API InnerLoopParams
133 bool enabled =
false;
134 double protoStart = 0;
136 double preLoopStart = 0;
137 double postLoopEnd = 0;
138 bool closedEnd =
true;
139 double valueOffset = 0;
144 const InnerLoopParams &other);
145 InnerLoopParams& operator=(
146 const InnerLoopParams &other);
148 const InnerLoopParams &other)
const;
150 const InnerLoopParams &other)
const;
152 bool IsValid()
const;
156 struct TS_API Extrapolation
158 ExtrapMethod method = ExtrapHeld;
160 LoopMode loopMode = LoopNone;
164 Extrapolation(ExtrapMethod method);
166 const Extrapolation &other);
167 Extrapolation& operator=(
168 const Extrapolation &other);
170 const Extrapolation &other)
const;
172 const Extrapolation &other)
const;
181 const TsTest_SplineData &other);
186 const TsTest_SplineData &other);
190 const TsTest_SplineData &other)
const;
194 const TsTest_SplineData &other)
const;
197 void SetIsHermite(
bool hermite);
205 const KnotSet &knots);
208 void SetPreExtrapolation(
209 const Extrapolation &preExtrap);
212 void SetPostExtrapolation(
213 const Extrapolation &postExtrap);
216 void SetInnerLoopParams(
217 const InnerLoopParams ¶ms);
220 bool GetIsHermite()
const;
228 GetPreExtrapolation()
const;
232 GetPostExtrapolation()
const;
235 const InnerLoopParams&
236 GetInnerLoopParams()
const;
239 Features GetRequiredFeatures()
const;
242 std::string GetDebugDescription()
const;
245 bool _isHermite =
false;
247 Extrapolation _preExtrap;
248 Extrapolation _postExtrap;
249 InnerLoopParams _innerLoopParams;
252PXR_NAMESPACE_CLOSE_SCOPE