SPH
|
Represents a user-defined function, defined by a set of points interpolated by either piecewise linear curve or cubic spline. More...
#include <Curve.h>
Public Member Functions | |
Curve () | |
Creates an identity function, defined in interval [0, 1]. More... | |
Curve (const Interval &rangeX, const Interval &rangeY) | |
Creates a linear function, mapping interval rangeX to interval rangeY. More... | |
Curve (Array< CurvePoint > &&curve) | |
Creates a function from provided set of points. More... | |
Curve (const Curve &curve) | |
Curve & | operator= (const Curve &curve) |
Float | operator() (const Float x) const |
Evaluates the function and returns the result. More... | |
Size | getPointCnt () const |
Returns the number of points defining the curve. More... | |
const CurvePoint & | getPoint (const Size idx) const |
Returns the position of idx-th point. More... | |
void | setPoint (const Size idx, const CurvePoint &newPoint) |
Modifies the position of idx-th points. More... | |
void | addPoint (const CurvePoint &newPoint) |
Adds a new point to the curve. More... | |
void | deletePoint (const Size idx) |
Removes idx-th point from curve. More... | |
bool | getSegment (const Size idx) const |
Returns the interpolation type of idx-th segment. More... | |
void | setSegment (const Size idx, const bool cubic) |
Modifies the interpolation type of idx-th segment. More... | |
Interval | rangeX () const |
Returns the extent of the curve in x-direction. More... | |
Interval | rangeY () const |
Returns the extent of the curve in y-direction. More... | |
Represents a user-defined function, defined by a set of points interpolated by either piecewise linear curve or cubic spline.
Curve::Curve | ( | ) |
Curve::Curve | ( | Array< CurvePoint > && | curve | ) |
void Curve::addPoint | ( | const CurvePoint & | newPoint | ) |
void Curve::deletePoint | ( | const Size | idx | ) |
const CurvePoint & Curve::getPoint | ( | const Size | idx | ) | const |
Size Curve::getPointCnt | ( | ) | const |
bool Curve::getSegment | ( | const Size | idx | ) | const |
Interval Curve::rangeX | ( | ) | const |
Interval Curve::rangeY | ( | ) | const |
void Curve::setPoint | ( | const Size | idx, |
const CurvePoint & | newPoint | ||
) |
void Curve::setSegment | ( | const Size | idx, |
const bool | cubic | ||
) |