TuttleOFX
1
|
Warp plugin. More...
#include <WarpPlugin.hpp>
Warp plugin.
Definition at line 46 of file WarpPlugin.hpp.
typedef boost::gil::point2<Scalar> tuttle::plugin::warp::WarpPlugin::Point2 |
Definition at line 51 of file WarpPlugin.hpp.
typedef double tuttle::plugin::warp::WarpPlugin::Scalar |
Definition at line 50 of file WarpPlugin.hpp.
tuttle::plugin::warp::WarpPlugin::WarpPlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 29 of file WarpPlugin.cpp.
References _clipDst, _clipSrc, _clipSrcB, _instanceChangedArgs, _paramCurveBegin, _paramGroupIn, _paramGroupOut, _paramGroupTgtIn, _paramGroupTgtOut, _paramInverse, _paramMethod, _paramNbPoints, _paramNbPointsBezier, _paramNextCurve, _paramOverlay, _paramOverlayIn, _paramOverlayInColor, _paramOverlayOut, _paramOverlayOutColor, _paramOverlayTgtIn, _paramOverlayTgtInColor, _paramOverlayTgtOut, _paramOverlayTgtOutColor, _paramPointIn, _paramPointOut, _paramPointTgtIn, _paramPointTgtOut, _paramReset, _paramRigiditeTPS, _paramSetKey, _transition, changedParam(), OFX::eChangePluginEdit, OFX::ParamSet::fetchBooleanParam(), OFX::ParamSet::fetchChoiceParam(), OFX::ImageEffect::fetchClip(), OFX::ParamSet::fetchDouble2DParam(), OFX::ParamSet::fetchDoubleParam(), OFX::ParamSet::fetchGroupParam(), OFX::ParamSet::fetchIntParam(), OFX::ParamSet::fetchPushButtonParam(), OFX::ParamSet::fetchRGBParam(), tuttle::plugin::warp::kClipSourceB, tuttle::plugin::warp::kMaxNbPoints, kOfxImageEffectOutputClipName, kOfxImageEffectSimpleSourceClipName, tuttle::plugin::warp::kParamCurveBegin, tuttle::plugin::warp::kParamGroupIn, tuttle::plugin::warp::kParamGroupTgtIn, tuttle::plugin::warp::kParamGroupTgtOut, tuttle::plugin::warp::kParamInverse, tuttle::plugin::warp::kParamMethod, tuttle::plugin::warp::kParamNbPoints, tuttle::plugin::warp::kParamNbPointsBezier, tuttle::plugin::warp::kParamNextCurve, tuttle::plugin::warp::kParamOverlay, tuttle::plugin::warp::kParamOverlayIn, tuttle::plugin::warp::kParamOverlayInColor, tuttle::plugin::warp::kParamOverlayOut, tuttle::plugin::warp::kParamOverlayOutColor, tuttle::plugin::warp::kParamOverlayTgtIn, tuttle::plugin::warp::kParamOverlayTgtInColor, tuttle::plugin::warp::kParamOverlayTgtOut, tuttle::plugin::warp::kParamOverlayTgtOutColor, tuttle::plugin::warp::kParamPointIn, tuttle::plugin::warp::kParamPointOut, tuttle::plugin::warp::kParamPointTgtIn, tuttle::plugin::warp::kParamPointTgtOut, tuttle::plugin::warp::kParamReset, tuttle::plugin::warp::kParamRigiditeTPS, tuttle::plugin::warp::kParamSetKey, tuttle::plugin::warp::kParamTransition, OFX::InstanceChangedArgs::reason, OFX::InstanceChangedArgs::renderScale, OFX::InstanceChangedArgs::time, OfxPointD::x, and OfxPointD::y.
void tuttle::plugin::warp::WarpPlugin::changedParam | ( | const OFX::InstanceChangedArgs & | args, |
const std::string & | paramName | ||
) | [virtual] |
called when a param has just had its value changed
Reimplemented from OFX::ImageEffect.
Definition at line 193 of file WarpPlugin.cpp.
References _paramCurveBegin, _paramMethod, _paramNbPoints, _paramPointIn, _paramPointOut, _paramPointTgtIn, _paramPointTgtOut, tuttle::plugin::warp::eParamMethodCreation, tuttle::plugin::warp::eParamMethodDelete, tuttle::plugin::warp::eParamMethodMove, OFX::IntParam::getValue(), OFX::ChoiceParam::getValue(), tuttle::plugin::warp::kMaxNbPoints, tuttle::plugin::warp::kParamNbPoints, tuttle::plugin::warp::kParamNextCurve, tuttle::plugin::warp::kParamPointIn, tuttle::plugin::warp::kParamPointOut, tuttle::plugin::warp::kParamPointTgtIn, tuttle::plugin::warp::kParamPointTgtOut, tuttle::plugin::warp::kParamReset, tuttle::plugin::warp::kParamSetKey, tuttle::plugin::warp::positionOrigine, OFX::IntParam::setValue(), OFX::InstanceChangedArgs::time, TUTTLE_INFO, and TUTTLE_LOG_DEBUG.
Referenced by WarpPlugin().
WarpProcessParams< WarpPlugin::Scalar > tuttle::plugin::warp::WarpPlugin::getProcessParams | ( | const OfxPointD & | renderScale = OFX::kNoRenderScale | ) | const |
Definition at line 102 of file WarpPlugin.cpp.
References _paramCurveBegin, _paramInverse, _paramMethod, _paramNbPoints, _paramNbPointsBezier, _paramPointIn, _paramPointOut, _paramPointTgtIn, _paramPointTgtOut, _paramRigiditeTPS, _transition, tuttle::plugin::warp::bezier::bezierSubdivide(), OFX::IntParam::getValue(), OFX::DoubleParam::getValue(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), tuttle::plugin::ofxToGil(), and std::swap().
Referenced by isIdentity().
bool tuttle::plugin::warp::WarpPlugin::isIdentity | ( | const OFX::RenderArguments & | args, |
OFX::Clip *& | identityClip, | ||
double & | identityTime | ||
) | [virtual] |
client is identity function, returns the clip and time for the identity function
If the effect would do no processing for the given param set and render arguments, then this function should return true and set the identityClip pointer to point to the clip that is the identity and identityTime to be the time at which to access the clip for the identity operation.
Reimplemented from OFX::ImageEffect.
Definition at line 282 of file WarpPlugin.cpp.
References _clipSrc, tuttle::plugin::warp::WarpProcessParams< Scalar >::_nbPoints, getProcessParams(), and OFX::RenderArguments::time.
void tuttle::plugin::warp::WarpPlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Implements OFX::ImageEffect.
Definition at line 304 of file WarpPlugin.cpp.
References _clipDst, OFX::eBitDepthFloat, OFX::eBitDepthUByte, OFX::eBitDepthUShort, OFX::ePixelComponentAlpha, OFX::ePixelComponentRGBA, OFX::Clip::getPixelComponents(), OFX::Clip::getPixelDepth(), OFX::mapBitDepthEnumToString(), OFX::mapPixelComponentEnumToString(), tuttle::plugin::ImageProcessor::setupAndProcess(), and TUTTLE_LOG_ERROR.
Destination image clip.
Definition at line 69 of file WarpPlugin.hpp.
Referenced by render(), and WarpPlugin().
Source image clip.
Definition at line 67 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), isIdentity(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 117 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 114 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), and WarpPlugin().
Definition at line 113 of file WarpPlugin.hpp.
Definition at line 86 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 93 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 81 of file WarpPlugin.hpp.
Definition at line 100 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 107 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 72 of file WarpPlugin.hpp.
Referenced by getProcessParams(), and WarpPlugin().
Definition at line 76 of file WarpPlugin.hpp.
Referenced by changedParam(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::penUp(), and WarpPlugin().
Definition at line 78 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::penUp(), and WarpPlugin().
Definition at line 83 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), and WarpPlugin().
Definition at line 74 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 71 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), and WarpPlugin().
Definition at line 89 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 90 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 96 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 97 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 103 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), and WarpPlugin().
Definition at line 104 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), and WarpPlugin().
Definition at line 110 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), and WarpPlugin().
Definition at line 111 of file WarpPlugin.hpp.
Referenced by tuttle::plugin::warp::WarpOverlayInteract::draw(), and WarpPlugin().
Definition at line 87 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 94 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
boost::array<OFX::Double2DParam*, 2 * kMaxNbPoints> tuttle::plugin::warp::WarpPlugin::_paramPointTgtIn |
Definition at line 101 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
boost::array<OFX::Double2DParam*, 2 * kMaxNbPoints> tuttle::plugin::warp::WarpPlugin::_paramPointTgtOut |
Definition at line 108 of file WarpPlugin.hpp.
Referenced by changedParam(), tuttle::plugin::warp::WarpOverlayInteract::draw(), getProcessParams(), tuttle::plugin::warp::WarpOverlayInteract::penDown(), tuttle::plugin::warp::WarpOverlayInteract::penMotion(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and WarpPlugin().
Definition at line 73 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 82 of file WarpPlugin.hpp.
Referenced by getProcessParams(), and WarpPlugin().
Definition at line 75 of file WarpPlugin.hpp.
Referenced by WarpPlugin().
Definition at line 79 of file WarpPlugin.hpp.
Referenced by getProcessParams(), and WarpPlugin().