X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fblineconvert.cpp;h=cc01ce95df0ef18d09b971aebc1f65488d002517;hb=d3dea62652ee8dee1c44db2c6ab3e358b5b0f3c2;hp=eb5e9dc5f78027f5f941dedb0cb5586e56887752;hpb=bbf05c1d5f53f61ec5b033c5c305a497d8389d46;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp index eb5e9dc..cc01ce9 100644 --- a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp +++ b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp @@ -106,7 +106,7 @@ inline void ThreePointddt(T &df, const T &f1, const T &f2, const T &f3, int bias df = (f1 -f2*2 + f3)*(1/2.0f); } -// WARNING -- totaly broken +// WARNING -- totally broken template < class T > inline void FivePointddt(T &df, const T &f1, const T &f2, const T &f3, int bias) { @@ -165,7 +165,7 @@ void DerivativeApprox(T &df, const T f[], const Real t[], int npoints, int index Lpj += mult; //add into the summation - //since the ks follow the exact patern we need for the divisor (use that too) + //since the ks follow the exact pattern we need for the divisor (use that too) div *= tj - t[k]; } } @@ -246,7 +246,7 @@ void GetFirstDerivatives(const std::vector &f, unsigned int left, void GetSimpleDerivatives(const std::vector &f, int left, int right, std::vector &df, int outleft, - const std::vector &di) + const std::vector &/*di*/) { int i1,i2,i; int offset = 2; //df = 1/2 (f[i+o]-f[i-o]) @@ -326,7 +326,7 @@ Real CurveError(const synfig::Point *pts, unsigned int n, std::vector &inds, const std::vector &f, const std::vector &df, std::vector &work) +int tessellate_curves(const std::vector &inds, const std::vector &f, const std::vector &df, std::vector &work) { if(inds.size() < 2) return 0; @@ -341,7 +341,7 @@ int tesselate_curves(const std::vector &inds, const std::vector j2 = j++; for(; j != end; j2 = j++) { - //if this curve has invalid error (in j) then retesselate its work points (requires reparametrization, etc.) + //if this curve has invalid error (in j) then retessellate its work points (requires reparametrization, etc.) if(j->error < 0) { //get the stepsize etc. for the number of points in here @@ -529,7 +529,7 @@ synfigapp::BLineConverter::operator () (std::list &out, cons brk.push_back(i); - //postprocess for breaks too close to eachother + //postprocess for breaks too close to each other Real d = 0; Point p = f[brk.front()]; @@ -629,7 +629,7 @@ synfigapp::BLineConverter::operator () (std::list &out, cons //preproceval += timer(); //numpre++; - work.resize(size*2-1); //guarantee that all points will be tesselated correctly (one point inbetween every 2 adjacent points) + work.resize(size*2-1); //guarantee that all points will be tessellated correctly (one point in between every 2 adjacent points) //if size of work is size*2-1, the step size should be 1/(size*2 - 2) //Real step = 1/(Real)(size*2 - 1); @@ -645,18 +645,18 @@ synfigapp::BLineConverter::operator () (std::list &out, cons //while there are still enough points between us, and the error is too high subdivide (and invalidate neighbors that share tangents) while(!done) { - //tesselate all curves with invalid error values + //tessellate all curves with invalid error values work[0] = f[i0]; //timer.reset(); - /*numtess += */tesselate_curves(curind,f,df,work); + /*numtess += */tessellate_curves(curind,f,df,work); //tesseval += timer(); //now get all error values //timer.reset(); for(i = 1; i < (int)curind.size(); ++i) { - if(curind[i].error < 0) //must have been retesselated, so now recalculate error value + if(curind[i].error < 0) //must have been retessellated, so now recalculate error value { //evaluate error from points (starting at current index) int size = curind[i].curind - curind[i-1].curind + 1; @@ -667,7 +667,7 @@ synfigapp::BLineConverter::operator () (std::list &out, cons { synfig::info("Holy crap %d-%d error %f",curind[i-1].curind,curind[i].curind,curind[i].error); curind[i].error = -1; - numtess += tesselate_curves(curind,f,df,work); + numtess += tessellate_curves(curind,f,df,work); curind[i].error = CurveError(&f[curind[i-1].curind], size, work,0,work.size());//(curind[i-1].curind - i0)*2,(curind[i].curind - i0)*2+1); }*/ @@ -807,7 +807,7 @@ synfigapp::BLineConverter::operator () (std::list &out, cons "\tDistance Calculation: %f\n" " Algorithm: (numtimes,totaltime)\n" "\tPreprocess step: (%d,%f)\n" - "\tTesselation step: (%d,%f)\n" + "\tTessellation step: (%d,%f)\n" "\tError step: (%d,%f)\n" "\tSplit step: (%d,%f)\n" " Num Input: %d, Num Output: %d\n"