|
SeExpr
|
Interpolation curve class for double->double and double->Vec3D. More...
#include <Curve.h>
Classes | |
| struct | CV |
Public Types | |
| enum | InterpType { kNone = 0 , kLinear , kSmooth , kSpline , kMonotoneSpline } |
| Supported interpolation types. More... | |
Public Member Functions | |
| Curve () | |
| void | addPoint (double position, const T &val, InterpType type) |
| Adds a point to the curve. | |
| void | preparePoints () |
| Prepares points for evaluation (sorts and computes boundaries, clamps extrema) | |
| T | getValue (const double param) const |
| Evaluates curve and returns full value. | |
| double | getChannelValue (const double param, int channel) const |
| CV | getLowerBoundCV (const double param) const |
Static Public Member Functions | |
| static bool | interpTypeValid (InterpType interp) |
| Returns whether the given interpolation type is supported. | |
| static bool | cvLessThan (const CV &cv1, const CV &cv2) |
| CV Parameter ordering (cv1._pos < cv2._pos) | |
Private Member Functions | |
| void | clampCurveSegment (const T &delta, T &d1, T &d2) |
| Performs hermite derivative clamping in canonical space. | |
| double | comp (const double &val, const int) |
| double | comp (const Vec3d &val, const int i) |
| void | clampCurveSegment (const double &delta, double &d1, double &d2) |
| void | clampCurveSegment (const Vec3d &delta, Vec3d &d1, Vec3d &d2) |
Static Private Member Functions | |
| static double | comp (const T &val, const int i) |
| Returns a component of the given value. | |
Private Attributes | |
| int | cacheCV |
| std::vector< CV > | _cvData |
| bool | prepared |
Interpolation curve class for double->double and double->Vec3D.
Interpolation curve class for mapping from double -> double or double -> Vec3D Subject to some interpolation points.
Each segment is interpolated according to the interpolation type specified on the left control point. Interpolation types supported are members of InterpType below.
Valid instantiation types for this are double, or Vec3D
| enum SeExpr2::Curve::InterpType |
| SeExpr2::Curve< T >::Curve | ( | ) |
| void SeExpr2::Curve< T >::addPoint | ( | double | position, |
| const T & | val, | ||
| InterpType | type ) |
|
inlineprivate |
|
private |
Performs hermite derivative clamping in canonical space.
|
private |
|
private |
|
staticprivate |
Returns a component of the given value.
Referenced by getChannelValue().
|
private |
|
static |
CV Parameter ordering (cv1._pos < cv2._pos)
Definition at line 38 of file Curve.cpp.
References SeExpr2::Curve< T >::CV::_pos.
Referenced by getChannelValue(), getLowerBoundCV(), getValue(), and preparePoints().
| double SeExpr2::Curve< T >::getChannelValue | ( | const double | param, |
| int | channel ) const |
Evaluates curve for a sub-component of the interpolation values must call preparePoints() before this is ok to call
Definition at line 150 of file Curve.cpp.
References _cvData, comp(), cvLessThan(), index(), kLinear, kMonotoneSpline, kNone, kSmooth, kSpline, prepared, x, and y.
| Curve< T >::CV SeExpr2::Curve< T >::getLowerBoundCV | ( | const double | param | ) | const |
| T SeExpr2::Curve< T >::getValue | ( | const double | param | ) | const |
|
static |
Returns whether the given interpolation type is supported.
Definition at line 211 of file Curve.cpp.
References kLinear, kMonotoneSpline, kNone, kSmooth, and kSpline.
Referenced by SeExpr2::CCurveFuncX::evalConstant(), and SeExpr2::CurveFuncX::evalConstant().
| void SeExpr2::Curve< T >::preparePoints | ( | ) |
|
private |
Definition at line 59 of file Curve.h.
Referenced by addPoint(), Curve(), getChannelValue(), getLowerBoundCV(), getValue(), and preparePoints().
|
mutableprivate |
Definition at line 39 of file Curve.h.
Referenced by Curve(), and preparePoints().
|
private |
Definition at line 60 of file Curve.h.
Referenced by addPoint(), Curve(), getChannelValue(), getLowerBoundCV(), getValue(), and preparePoints().