8#ifndef PXR_BASE_TS_SEGMENT_H
9#define PXR_BASE_TS_SEGMENT_H
13#include "pxr/base/ts/api.h"
14#include "pxr/base/ts/types.h"
18PXR_NAMESPACE_OPEN_SCOPE
24enum class Ts_SegmentInterp
62 Ts_SegmentInterp interp = Ts_SegmentInterp::ValueBlock;
65 void SetInterp(TsInterpMode interpMode, TsCurveType curveType);
114 template <
typename T>
123 template <
typename T>
135 result.p0[0] = -result.p0[0];
136 result.t0[0] = -result.t0[0];
137 result.t1[0] = -result.t1[0];
138 result.p1[0] = -result.p1[0];
143 swap(result.p0, result.p1);
144 swap(result.t0, result.t1);
152 return (p0 == rhs.p0 &&
156 interp == rhs.interp);
162 return !(*
this == rhs);
165 bool IsClose(
const Ts_Segment& other,
const double tolerance)
const
167 return (interp == other.interp &&
182std::ostream& operator <<(std::ostream&,
const Ts_SegmentInterp);
184std::ostream& operator <<(std::ostream&,
const Ts_Segment&);
186PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 2 double components.
bool GfIsClose(GfColor const &c1, GfColor const &c2, double tolerance)
Tests for equality of the RGB tuple in a color with a given tolerance, returning true if the length o...
Ts_Segment represents one section of a spline.
void SetInterp(TsInterpMode interpMode, TsCurveType curveType)
Set interp from a TsInterpMode and TsCurveType.
Ts_Segment & operator-=(const GfVec2d &delta)
Subtract the (timeDelta, valueDelta) contained in the GfVec2d argument from the segment's time and va...
Ts_Segment & operator+=(const GfVec2d &delta)
Add the (timeDelta, valueDelta) contained in the GfVec2d argument to the segment's time and value.
TS_API double _ComputeDerivative(double u) const
Compute dv/dt at the value u in the interval [0..1].
bool operator==(const Ts_Segment &rhs) const
Compare for equivalence.
bool operator!=(const Ts_Segment &rhs) const
Not equivalent.
Ts_Segment operator+(const T &delta) const
Addition operator.