TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_BEZIER_HPP_ 00002 #define _TUTTLE_PLUGIN_BEZIER_HPP_ 00003 00004 #include "../WarpPlugin.hpp" 00005 #include "../WarpProcess.hpp" 00006 #include "../WarpDefinitions.hpp" 00007 #include "../WarpOverlayInteract.hpp" 00008 00009 #include <sstream> 00010 #include <tuttle/plugin/global.hpp> 00011 #include <ofxsImageEffect.h> 00012 #include <ofxsMultiThread.h> 00013 #include <boost/gil/gil_all.hpp> 00014 #include <boost/numeric/conversion/cast.hpp> 00015 #include <boost/numeric/ublas/io.hpp> 00016 #include <boost/numeric/ublas/lu.hpp> 00017 #include <boost/numeric/ublas/matrix.hpp> 00018 #include <boost/numeric/ublas/vector.hpp> 00019 #include <boost/algorithm/string/predicate.hpp> 00020 #include <tuttle/plugin/opengl/gl.h> 00021 00022 #include <vector> 00023 00024 namespace tuttle { 00025 namespace plugin { 00026 namespace warp { 00027 namespace bezier { 00028 00029 using namespace boost::gil; 00030 using namespace boost::numeric::ublas; 00031 00032 point2<double> barycentre( const std::vector< point2<double> >& pts, const double t ); 00033 00034 void tracerPoint( const point2<double>& p ); 00035 00036 void drawBezier( const std::vector< point2<double> >& tabPts, const std::size_t nbBezier, const double r, const double v, const double b ); 00037 00038 /** 00039 * @param[in] pts List of four points [A, A tangent, B tangent, B] 00040 * @param[in] subdivs Number of subdivisions 00041 * @param[out] outputPts Output list of bezier points 00042 */ 00043 void bezierSubdivide( const std::vector< point2<double> >& pts, const std::size_t subdivs, std::vector< point2<double> >& outputPts ); 00044 00045 00046 } 00047 } 00048 } 00049 } 00050 00051 #endif