![]() |
|
Ts_Segment represents one section of a spline. More...
#include <segment.h>
Public Member Functions | |
| void | SetInterp (TsInterpMode interpMode, TsCurveType curveType) |
| Set interp from a TsInterpMode and TsCurveType. | |
| Ts_Segment & | operator+= (const GfVec2d &delta) |
Add the (timeDelta, valueDelta) contained in the GfVec2d argument to the segment's time and value. | |
| Ts_Segment & | operator+= (const double timeDelta) |
| Add the timeDelta argument to the segment's time. | |
| Ts_Segment & | operator-= (const GfVec2d &delta) |
Subtract the (timeDelta, valueDelta) contained in the GfVec2d argument from the segment's time and value. | |
| Ts_Segment & | operator-= (const double timeDelta) |
| Subtract the timeDelta argument from the segment's time. | |
| template<typename T > | |
| Ts_Segment | operator+ (const T &delta) const |
| Addition operator. | |
| template<typename T > | |
| Ts_Segment | operator- (const T &delta) const |
| Ts_Segment | operator- () const |
| bool | operator== (const Ts_Segment &rhs) const |
| Compare for equivalence. | |
| bool | operator!= (const Ts_Segment &rhs) const |
| Not equivalent. | |
| bool | IsClose (const Ts_Segment &other, const double tolerance) const |
| TS_API double | _ComputeDerivative (double u) const |
| Compute dv/dt at the value u in the interval [0..1]. | |
Public Attributes | |
| GfVec2d | p0 = GfVec2d(0) |
| GfVec2d | t0 = GfVec2d(0) |
| GfVec2d | t1 = GfVec2d(0) |
| GfVec2d | p1 = GfVec2d(0) |
| Ts_SegmentInterp | interp = Ts_SegmentInterp::ValueBlock |
Ts_Segment represents one section of a spline.
It generally contains the "post" side values of one knot (time, value, tangent, and interpolation) and the "pre" side of the next knot (preValue and tangent). There are special case interpolation types for pre- and post-extrapolation and the curve interpolation of TsKnot has been split into separate Bezier and Hermite values.
The data is stored as 4 GfVec2d values that represent (time, value) points that are the knot points and the tangent end points. Note that the tangents are stored as their end points rather than as width and slope as they are in the knots. Also note that held interpolation segments still store the value of the post-side knot even though that value is not used for segment interpolation. This allows the knots to be reconstructed from the segment data.
If the interpolation is PreExtrap or PostExtrap then the starting or ending point (respectively) contains (+/- infinity, slope) rather than (time, value). The straight line is extrapolated to infinity from the other end point of the segment with the given slope.
| TS_API double _ComputeDerivative | ( | double | u | ) | const |
Compute dv/dt at the value u in the interval [0..1].
Note: This currently only supports u == 0.0 or u == 1.0.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void SetInterp | ( | TsInterpMode | interpMode, |
| TsCurveType | curveType | ||
| ) |
Set interp from a TsInterpMode and TsCurveType.