8 #ifndef PXR_BASE_TS_REGRESSION_PREVENTER_H
9 #define PXR_BASE_TS_REGRESSION_PREVENTER_H
46 enum TS_API InteractiveMode
99 TsTime activeKnotTime,
109 TsTime activeKnotTime,
110 InteractiveMode
mode,
148 const TsKnot &proposedActiveKnot,
162 _ModeLimitOpposite = ModeLimitOpposite
168 TsTime activeKnotTime,
185 const TsKnot &originalKnot);
188 void RestoreOriginal();
192 void RemoveCurrent();
203 const TsKnot originalKnot;
212 struct _WorkingKnotState
219 _KnotState *parentState,
220 const TsKnot &proposedKnot);
226 _KnotState *parentState);
236 void WriteProposed();
244 _KnotState*
const parentState;
247 const TsKnot proposedKnot;
269 WhichSegment whichSegment,
271 _WorkingKnotState* activeKnotState,
272 _WorkingKnotState* oppositeKnotState,
287 bool _AdjustWithContain();
288 bool _AdjustWithKeepRatio();
289 bool _AdjustWithKeepStart();
290 bool _AdjustWithLimitActive();
291 bool _AdjustWithLimitOpposite();
296 TsTime _GetProposedActiveWidth()
const;
297 TsTime _GetProposedOppositeWidth()
const;
298 void _SetActiveWidth(TsTime
width);
299 void _SetOppositeWidth(TsTime
width);
303 TsTime _GetProposedStartWidth()
const;
304 TsTime _GetProposedEndWidth()
const;
305 void _SetStartWidth(TsTime
width);
306 void _SetEndWidth(TsTime
width);
309 TsTime _GetSegmentWidth()
const;
312 const WhichSegment _whichSegment;
315 _WorkingKnotState*
const _activeKnotState;
316 _WorkingKnotState*
const _oppositeKnotState;
317 SetResult*
const _result;
323 const TsKnot &proposedActiveKnot,
324 SetResult *resultOut)
const;
325 void _HandleInitialAdjustment(
326 const TsKnot &proposedActiveKnot,
327 SetResult* resultOut);
328 void _HandleTimeChange(TsTime proposedActiveTime);
330 const TsKnot &proposedActiveKnot,
332 SetResult* resultOut);
340 bool _initialAdjustmentDone;
342 std::optional<_KnotState> _activeKnotState;
343 std::optional<_KnotState> _preKnotState;
344 std::optional<_KnotState> _postKnotState;
345 std::optional<_KnotState> _overwrittenKnotState;
TS_API bool Set(const TsKnot &proposedActiveKnot, SetResult *resultOut=nullptr)
bool adjusted
Whether any adjustments were made.
#define PXR_NAMESPACE_OPEN_SCOPE
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
static TS_API bool ProcessSegment(Ts_KnotData *startKnot, Ts_KnotData *endKnot, TsAntiRegressionMode mode)
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 TS_API bool IsSegmentRegressive(const Ts_KnotData *startKnot, const Ts_KnotData *endKnot, TsAntiRegressionMode mode)
GLenum GLint GLint * precision
TsTime postActiveAdjustedWidth
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