8 #ifndef PXR_BASE_TS_REGRESSION_PREVENTER_H
9 #define PXR_BASE_TS_REGRESSION_PREVENTER_H
45 enum TS_API InteractiveMode
98 TsTime activeKnotTime,
108 TsTime activeKnotTime,
109 InteractiveMode
mode,
147 const TsKnot &proposedActiveKnot,
161 _ModeLimitOpposite = ModeLimitOpposite
167 TsTime activeKnotTime,
184 const TsKnot &originalKnot);
187 void RestoreOriginal();
191 void RemoveCurrent();
202 const TsKnot originalKnot;
211 struct _WorkingKnotState
218 _KnotState *parentState,
219 const TsKnot &proposedKnot);
225 _KnotState *parentState);
235 void WriteProposed();
243 _KnotState*
const parentState;
246 const TsKnot proposedKnot;
268 WhichSegment whichSegment,
270 _WorkingKnotState *activeKnotState,
271 _WorkingKnotState *oppositeKnotState,
281 bool _AdjustWithContain();
282 bool _AdjustWithKeepRatio();
283 bool _AdjustWithKeepStart();
284 bool _AdjustWithLimitActive();
285 bool _AdjustWithLimitOpposite();
290 TsTime _GetProposedActiveWidth()
const;
291 TsTime _GetProposedOppositeWidth()
const;
292 void _SetActiveWidth(TsTime
width);
293 void _SetOppositeWidth(TsTime
width);
297 TsTime _GetProposedStartWidth()
const;
298 TsTime _GetProposedEndWidth()
const;
299 void _SetStartWidth(TsTime
width);
300 void _SetEndWidth(TsTime
width);
303 TsTime _GetSegmentWidth()
const;
306 const WhichSegment _whichSegment;
308 _WorkingKnotState*
const _activeKnotState;
309 _WorkingKnotState*
const _oppositeKnotState;
310 SetResult*
const _result;
316 const TsKnot &proposedActiveKnot,
317 SetResult *resultOut)
const;
318 void _HandleInitialAdjustment(
319 const TsKnot &proposedActiveKnot,
320 SetResult* resultOut);
321 void _HandleTimeChange(TsTime proposedActiveTime);
323 const TsKnot &proposedActiveKnot,
325 SetResult* resultOut);
333 bool _initialAdjustmentDone;
335 std::optional<_KnotState> _activeKnotState;
336 std::optional<_KnotState> _preKnotState;
337 std::optional<_KnotState> _postKnotState;
338 std::optional<_KnotState> _overwrittenKnotState;
TS_API bool Set(const TsKnot &proposedActiveKnot, SetResult *resultOut=nullptr)
bool adjusted
Whether any adjustments were made.
static bool IsSegmentRegressive(const Ts_KnotData *startKnot, const Ts_KnotData *endKnot, TsAntiRegressionMode mode)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Quat< T > spline(const Quat< T > &q0, const Quat< T > &q1, const Quat< T > &q2, const Quat< T > &q3, T t) IMATH_NOEXCEPT
Details of the result of an interactive Set call.
**But if you need a result
TS_API std::string GetDebugDescription(int precision=6) const
bool havePreSegment
If there is a pre-segment, what adjustments were made to it.
static bool ProcessSegment(Ts_KnotData *startKnot, Ts_KnotData *endKnot, TsAntiRegressionMode mode)
GLenum GLint GLint * precision
TsTime postActiveAdjustedWidth
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
TS_API TsRegressionPreventer(TsSpline *spline, TsTime activeKnotTime, bool limit=true)
#define PXR_NAMESPACE_CLOSE_SCOPE
TsTime preActiveAdjustedWidth
bool havePostSegment
If there is a post-segment, what adjustments were made to it.
TsTime postOppositeAdjustedWidth
TsTime preOppositeAdjustedWidth
bool postOppositeAdjusted