8 #ifndef PXR_BASE_TS_SPLINE_H
9 #define PXR_BASE_TS_SPLINE_H
83 TsSpline&
operator=(
const TsSpline &other);
101 template <
typename T>
175 std::string *reasonOut =
nullptr)
const;
310 std::string* reason =
nullptr);
348 template <
typename T>
353 template <
typename T>
358 template <
typename T>
363 template <
typename T>
368 template <
typename T>
373 template <
typename T>
398 template <
typename Vertex>
407 return _Sample(timeInterval, timeScale, valueScale, tolerance,
417 template <
typename Vertex>
426 return _Sample(timeInterval, timeScale, valueScale, tolerance,
524 std::pair<VtValue, VtValue> *rangeOut)
const;
527 template <
typename T>
530 std::pair<T, T> *rangeOut)
const;
543 TsTime startTime)
const;
548 TsTime startTime)
const;
562 template <
typename HashState>
567 h.Append(spline._data.get());
574 void _SetKnotUnchecked(
const TsKnot & knot);
576 template <
typename SampleHolder>
582 SampleHolder* splineSamples)
const;
601 template <
typename T>
613 bool _UpdateAllTangents();
618 bool _UpdateKnotTangents(
const size_t knotIndex);
625 std::shared_ptr<Ts_SplineData> _data;
640 void swap(TsSpline &lhs, TsSpline &rhs);
656 template <
typename T>
667 template <
typename T>
668 bool TsSpline::_Eval(
674 const std::optional<double>
result =
675 Ts_Eval(_GetData(), time, aspect, location);
682 *valueOut =
T(*result);
691 bool TsSpline::_Eval(
697 template <
typename T>
703 template <
typename T>
709 template <
typename T>
715 template <
typename T>
721 template <
typename T>
727 template <
typename T>
bool Sample(const GfInterval &timeInterval, double timeScale, double valueScale, double tolerance, TsSplineSamplesWithSources< Vertex > *splineSamples) const
void swap(ArAssetInfo &lhs, ArAssetInfo &rhs)
TS_API TsKnotMap GetKnotsWithLoopsBaked(const GfInterval &interval) const
TS_API bool IsC0Continuous() const
Not yet implemented.
bool EvalHeld(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
VT_VALUE_TYPE_CAN_TRANSFORM(TsSpline)
TsSplineSamplesWithSources<Vertex> is a TsSplineSamples<Vertex> that also includes source information...
bool Eval(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
friend Ts_SplineData * Ts_GetSplineData(TsSpline &spline)
static TS_API bool IsSupportedValueType(TfType valueType)
TS_API TsExtrapolation GetPreExtrapolation() const
TS_API bool IsSegmentFlat(TsTime startTime) const
Not yet implemented.
GT_API const UT_StringHolder time
#define PXR_NAMESPACE_OPEN_SCOPE
TS_API bool IsEmpty() const
Not yet implemented.
TS_API bool ClearRedundantKnots(VtValue defaultValue=VtValue(), const GfInterval &interval=GfInterval::GetFullInterval())
Not yet implemented.
static TS_API TsAntiRegressionMode GetAntiRegressionAuthoringMode()
TS_API TsCurveType GetCurveType() const
TS_API bool HasRegressiveTangents() const
TS_API bool SetKnot(const TsKnot &knot, GfInterval *affectedIntervalOut=nullptr)
TS_API TfType GetValueType() const
TS_API bool DoSidesDiffer(TsTime time) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
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 GfInterval GetFullInterval()
Returns the full interval (-inf, inf).
TS_API void SetKnots(const TsKnotMap &knots)
**But if you need a result
friend void TfHashAppend(HashState &h, const TsSpline &spline)
TS_API bool Breakdown(TsTime time, GfInterval *affectedIntervalOut=nullptr)
TS_API bool IsSegmentMonotonic(TsTime startTime) const
Not yet implemented.
TS_API bool IsC1Continuous() const
Not yet implemented.
GLenum const GLfloat * params
TS_API TsExtrapolation GetPostExtrapolation() const
TS_API bool AdjustRegressiveTangents()
TS_API bool GetValueRange(const GfInterval &timeSpan, std::pair< VtValue, VtValue > *rangeOut) const
Not yet implemented.
static TS_API void ApplyOffsetAndScale(TsSpline *spline, const TsTime offset, const double scale)
TS_API TsKnotMap GetKnots() const
TS_API bool GetKnot(TsTime time, TsKnot *knotOut) const
GA_API const UT_StringHolder scale
TS_API void SetInnerLoopParams(const TsLoopParams ¶ms)
TS_API void SetCurveType(TsCurveType curveType)
TS_API bool IsG1Continuous() const
Not yet implemented.
TS_API GfInterval Diff(const TsSpline &other) const
Compare two splines.
TS_API void SetPostExtrapolation(const TsExtrapolation &extrap)
TS_API bool BakeInnerLoops()
TS_API bool HasExtrapolatingLoops() const
Not yet implemented.
bool EvalDerivative(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
TS_API bool HasLoops() const
Convenience for HasInnerLoops() || HasExtrapolatingLoops().
TS_API bool operator!=(const TsSpline &other) const
TS_API std::optional< double > Ts_Eval(const Ts_SplineData *data, TsTime time, Ts_EvalAspect aspect, Ts_EvalLocation location)
TS_API bool IsTimeValued() const
TS_API bool HasValueBlockAtTime(TsTime time) const
Not yet implemented.
TS_API bool IsKnotRedundant(TsTime time, VtValue defaultValue=VtValue()) const
Not yet implemented.
TS_API bool operator==(const TsSpline &other) const
GLfloat GLfloat GLfloat GLfloat h
TS_API void RemoveKnot(TsTime time, GfInterval *affectedIntervalOut=nullptr)
TS_API TsLoopParams GetInnerLoopParams() const
#define PXR_NAMESPACE_CLOSE_SCOPE
TS_API bool IsLinear() const
Not yet implemented.
TS_API bool CanSetKnot(const TsKnot &knot, std::string *reasonOut=nullptr) const
bool EvalPreValue(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
TS_API std::ostream & operator<<(std::ostream &out, const TsSpline &spline)
Output a text representation of a spline to a stream.
TS_API bool HasInnerLoops() const
Not yet implemented.
TS_API bool HasValueBlocks() const
Not yet implemented.
TS_API TsKnotMap GetKnotsWithInnerLoopsBaked() const
TS_API bool IsVarying() const
Not yet implemented.
bool EvalPreValueHeld(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
TsSplineSamples<Vertex> holds a collection of piecewise linear polylines that approximate a TsSpline...
TS_API void SetTimeValued(bool timeValued)
bool EvalPreDerivative(TsTime time, T *valueOut) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
bool Sample(const GfInterval &timeInterval, double timeScale, double valueScale, double tolerance, TsSplineSamples< Vertex > *splineSamples) const
Evaluates the value of the TsSpline over the given time interval, typically for drawing.
TS_API bool CanBreakdown(TsTime time, std::string *reason=nullptr)
TS_API TsSpline & operator=(const TsSpline &other)
TS_API void SetPreExtrapolation(const TsExtrapolation &extrap)