TuttleOFX
1
|
Wraps up a parametric param. More...
#include <ofxsParam.h>
Public Member Functions | |
double | getValue (const int curveIndex, const OfxTime time, const double parametricPosition) |
Evaluates a parametric parameter. | |
int | getNControlPoints (const int curveIndex, const OfxTime time) |
Returns the number of control points in the parametric param. | |
std::pair< double, double > | getNthControlPoints (const int curveIndex, const OfxTime time, const int nthCtl) |
Returns the key/value pair of the nth control point. | |
void | setNthControlPoints (const int curveIndex, const OfxTime time, const int nthCtl, const double key, const double value, const bool addAnimationKey) |
Modifies an existing control point on a curve. | |
void | setNthControlPoints (const int curveIndex, const OfxTime time, const int nthCtl, const std::pair< double, double > ctrlPoint, const bool addAnimationKey) |
void | addControlPoint (const int curveIndex, const OfxTime time, const double key, const double value, const bool addAnimationKey) |
Adds a control point to the curve. | |
void | deleteControlPoint (const int curveIndex, const int nthCtl) |
Deletes the nth control point from a parametric param. | |
void | deleteControlPoint (const int curveIndex) |
Delete all curve control points on the given param. | |
Protected Member Functions | |
ParametricParam (const ParamSet *paramSet, const std::string &name, OfxParamHandle handle) | |
hidden constructor | |
Private Member Functions | |
mDeclareProtectedAssignAndCC (ParametricParam) | |
ParametricParam (void) | |
Friends | |
class | ParamSet |
Wraps up a parametric param.
Definition at line 1722 of file ofxsParam.h.
OFX::ParametricParam::ParametricParam | ( | void | ) | [inline, private] |
Definition at line 1726 of file ofxsParam.h.
OFX::ParametricParam::ParametricParam | ( | const ParamSet * | paramSet, |
const std::string & | name, | ||
OfxParamHandle | handle | ||
) | [protected] |
hidden constructor
Definition at line 2350 of file ofxsParams.cpp.
void OFX::ParametricParam::addControlPoint | ( | const int | curveIndex, |
const OfxTime | time, | ||
const double | key, | ||
const double | value, | ||
const bool | addAnimationKey | ||
) |
Adds a control point to the curve.
This will add a new control point to the given dimension of a parametric parameter. If a key exists sufficiently close to 'key', then it will be set to the indicated control point.
Definition at line 2484 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamAddControlPoint, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::HistogramPlugin::changedParam(), and tuttle::plugin::histogramKeyer::HistogramKeyerPlugin::changedParam().
void OFX::ParametricParam::deleteControlPoint | ( | const int | curveIndex, |
const int | nthCtl | ||
) |
Deletes the nth control point from a parametric param.
Definition at line 2499 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamDeleteControlPoint, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::HistogramPlugin::changedParam(), and tuttle::plugin::histogramKeyer::HistogramKeyerPlugin::changedParam().
void OFX::ParametricParam::deleteControlPoint | ( | const int | curveIndex | ) |
Delete all curve control points on the given param.
Definition at line 2510 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamDeleteAllControlPoints, and OFX::throwSuiteStatusException().
int OFX::ParametricParam::getNControlPoints | ( | const int | curveIndex, |
const OfxTime | time | ||
) |
Returns the number of control points in the parametric param.
Definition at line 2383 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamGetNControlPoints, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::HistogramPlugin::changedParam(), and tuttle::plugin::histogramKeyer::HistogramKeyerPlugin::changedParam().
std::pair< double, double > OFX::ParametricParam::getNthControlPoints | ( | const int | curveIndex, |
const OfxTime | time, | ||
const int | nthCtl | ||
) |
Returns the key/value pair of the nth control point.
Definition at line 2403 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamGetNthControlPoint, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::HistogramPlugin::changedParam(), and tuttle::plugin::histogramKeyer::HistogramKeyerPlugin::changedParam().
double OFX::ParametricParam::getValue | ( | const int | curveIndex, |
const OfxTime | time, | ||
const double | parametricPosition | ||
) |
Evaluates a parametric parameter.
Definition at line 2362 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamGetValue, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::Compute_alpha_pixel::operator()(), and tuttle::plugin::histogramKeyer::Compute_alpha_pixel::operator()().
OFX::ParametricParam::mDeclareProtectedAssignAndCC | ( | ParametricParam | ) | [private] |
void OFX::ParametricParam::setNthControlPoints | ( | const int | curveIndex, |
const OfxTime | time, | ||
const int | nthCtl, | ||
const double | key, | ||
const double | value, | ||
const bool | addAnimationKey | ||
) |
Modifies an existing control point on a curve.
This modifies an existing control point. Note that by changing key, the order of the control point may be modified (as you may move it before or after anther point). So be careful when iterating over a curves control points and you change a key.
Definition at line 2439 of file ofxsParams.cpp.
References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamSetNthControlPoint, and OFX::throwSuiteStatusException().
Referenced by tuttle::plugin::histogram::HistogramPlugin::changedParam(), tuttle::plugin::histogramKeyer::HistogramKeyerPlugin::changedParam(), and setNthControlPoints().
void OFX::ParametricParam::setNthControlPoints | ( | const int | curveIndex, |
const OfxTime | time, | ||
const int | nthCtl, | ||
const std::pair< double, double > | ctrlPoint, | ||
const bool | addAnimationKey | ||
) |
Definition at line 2456 of file ofxsParams.cpp.
References setNthControlPoints().
friend class ParamSet [friend] |
Reimplemented from OFX::Param.
Definition at line 1733 of file ofxsParam.h.