TuttleOFX
1
|
The OFX suite used to define and manipulate 'parametric' parameters. More...
#include <ofxParametricParam.h>
Data Fields | |
OfxStatus(* | parametricParamGetValue )(OfxParamHandle param, int curveIndex, OfxTime time, double parametricPosition, double *returnValue) |
Evaluates a parametric parameter. | |
OfxStatus(* | parametricParamGetNControlPoints )(OfxParamHandle param, int curveIndex, double time, int *returnValue) |
Returns the number of control points in the parametric param. | |
OfxStatus(* | parametricParamGetNthControlPoint )(OfxParamHandle param, int curveIndex, double time, int nthCtl, double *key, double *value) |
Returns the key/value pair of the nth control point. | |
OfxStatus(* | parametricParamSetNthControlPoint )(OfxParamHandle param, int curveIndex, double time, int nthCtl, double key, double value, bool addAnimationKey) |
Modifies an existing control point on a curve. | |
OfxStatus(* | parametricParamAddControlPoint )(OfxParamHandle param, int curveIndex, double time, double key, double value, bool addAnimationKey) |
Adds a control point to the curve. | |
OfxStatus(* | parametricParamDeleteControlPoint )(OfxParamHandle param, int curveIndex, int nthCtl) |
Deletes the nth control point from a parametric param. | |
OfxStatus(* | parametricParamDeleteAllControlPoints )(OfxParamHandle param, int curveIndex) |
Delete all curve control points on the given param. |
The OFX suite used to define and manipulate 'parametric' parameters.
This is an optional suite.
Parametric parameters are in effect 'functions' a plug-in can ask a host to arbitrarily evaluate for some value 'x'. A classic use case would be for constructing look-up tables, a plug-in would ask the host to evaluate one at multiple values from 0 to 1 and use that to fill an array.
A host would probably represent this to a user as a cubic curve in a standard curve editor interface, or possibly through scripting. The user would then use this to define the 'shape' of the parameter.
The evaluation of such params is not the same as animation, they are returning values based on some arbitrary argument orthogonal to time, so to evaluate such a param, you need to pass a parametric position and time.
Often, you would want such a parametric parameter to be multi-dimensional, for example, a colour look-up table might want three values, one for red, green and blue. Rather than declare three separate parametric parameters, it would be better to have one such parameter with multiple values in it.
The major complication with these parameters is how to allow a plug-in to set values, and defaults. The default default value of a parametric curve is to be an identity lookup. If a plugin wishes to set a different default value for a curve, it can use the suite to set key/value pairs on the descriptor of the param. When a new instance is made, it will have these curve values as a default.
Definition at line 167 of file ofxParametricParam.h.
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamAddControlPoint)(OfxParamHandle param, int curveIndex, double time, double key, double value, 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 277 of file ofxParametricParam.h.
Referenced by OFX::ParametricParamDescriptor::addControlPoint(), and OFX::ParametricParam::addControlPoint().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamDeleteAllControlPoints)(OfxParamHandle param, int curveIndex) |
Delete all curve control points on the given param.
Definition at line 299 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::deleteControlPoint().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamDeleteControlPoint)(OfxParamHandle param, int curveIndex, int nthCtl) |
Deletes the nth control point from a parametric param.
Definition at line 290 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::deleteControlPoint().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamGetNControlPoints)(OfxParamHandle param, int curveIndex, double time, int *returnValue) |
Returns the number of control points in the parametric param.
Definition at line 201 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::getNControlPoints().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamGetNthControlPoint)(OfxParamHandle param, int curveIndex, double time, int nthCtl, double *key, double *value) |
Returns the key/value pair of the nth control point.
Definition at line 220 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::getNthControlPoints().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamGetValue)(OfxParamHandle param, int curveIndex, OfxTime time, double parametricPosition, double *returnValue) |
Evaluates a parametric parameter.
Definition at line 182 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::getValue().
OfxStatus(* OfxParametricParameterSuiteV1::parametricParamSetNthControlPoint)(OfxParamHandle param, int curveIndex, double time, int nthCtl, double key, double value, 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 249 of file ofxParametricParam.h.
Referenced by OFX::ParametricParam::setNthControlPoints().