TuttleOFX  1
OFX::ParametricParam Class Reference

Wraps up a parametric param. More...

#include <ofxsParam.h>

Inheritance diagram for OFX::ParametricParam:
Collaboration diagram for OFX::ParametricParam:

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

Detailed Description

Wraps up a parametric param.

Definition at line 1722 of file ofxsParam.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

  • curveIndex which dimension to set
  • time the time to set the value at
  • key key of the control point
  • value value of the control point
  • addAnimationKey if the param is an animatable, setting this to true will force an animation keyframe to be set as well as a curve key, otherwise if false, a key will only be added if the curve is already animating.

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().

Here is the call graph for this function:

void OFX::ParametricParam::deleteControlPoint ( const int  curveIndex,
const int  nthCtl 
)

Deletes the nth control point from a parametric param.

  • curveIndex which dimension to delete
  • nthCtl the control point to delete

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().

Here is the call graph for this function:

void OFX::ParametricParam::deleteControlPoint ( const int  curveIndex)

Delete all curve control points on the given param.

  • curveIndex which dimension to clear

Definition at line 2510 of file ofxsParams.cpp.

References OFX::Param::getOfxHandle(), OFX::Private::gParametricParameterSuite, OfxParametricParameterSuiteV1::parametricParamDeleteAllControlPoints, and OFX::throwSuiteStatusException().

Here is the call graph for this function:

int OFX::ParametricParam::getNControlPoints ( const int  curveIndex,
const OfxTime  time 
)

Returns the number of control points in the parametric param.

  • curveIndex which dimension to check
  • time the time to check
Returns:
the integer value is returned

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().

Here is the call graph for this function:

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.

  • curveIndex which dimension to check
  • time the time to check
  • nthCtl the nth control point to get the value of
Returns:
a pair with key and value

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().

Here is the call graph for this function:

double OFX::ParametricParam::getValue ( const int  curveIndex,
const OfxTime  time,
const double  parametricPosition 
)

Evaluates a parametric parameter.

  • curveIndex which dimension to evaluate
  • time the time to evaluate to the parametric param at
  • parametricPosition the position to evaluate the parametric param at
Returns:
the double value is returned

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()().

Here is the call graph for this function:

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.

  • curveIndex which dimension to set
  • time the time to set the value at
  • nthCtl the control point to modify
  • key key of the control point
  • value value of the control point
  • addAnimationKey if the param is an animatable, setting this to true will force an animation keyframe to be set as well as a curve key, otherwise if false, a key will only be added if the curve is already animating.
Returns:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class ParamSet [friend]

Reimplemented from OFX::Param.

Definition at line 1733 of file ofxsParam.h.


The documentation for this class was generated from the following files: