summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1cf7a95)
raw | patch | inline | side by side (parent: 1cf7a95)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 13 Apr 2008 19:34:10 +0000 (19:34 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 13 Apr 2008 19:34:10 +0000 (19:34 +0000) |
src/live_effects/lpe-patternalongpath.cpp | patch | blob | history | |
src/live_effects/lpe-sketch.cpp | patch | blob | history |
index eab3dd80ee50656b0a4acb4087cf3739393225a2..d36050a7fe01e38cd07149983b223b3896f8f95d 100644 (file)
}
-
-//TODO: does this already exist in 2Geom? if not, move this there...
-static
-std::vector<Geom::Piecewise<Geom::D2<Geom::SBasis> > >
-split_at_discontinuities (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwsbin, double tol = .0001)
-{
- using namespace Geom;
- std::vector<Piecewise<D2<SBasis> > > ret;
- unsigned piece_start = 0;
- for (unsigned i=0; i<pwsbin.segs.size(); i++){
- if (i==(pwsbin.segs.size()-1) || L2(pwsbin.segs[i].at1()- pwsbin.segs[i+1].at0()) > tol){
- Piecewise<D2<SBasis> > piece;
- piece.cuts.push_back(pwsbin.cuts[piece_start]);
- for (unsigned j = piece_start; j<i+1; j++){
- piece.segs.push_back(pwsbin.segs[j]);
- piece.cuts.push_back(pwsbin.cuts[j+1]);
- }
- ret.push_back(piece);
- piece_start = i+1;
- }
- }
- return ret;
-}
-
-
Geom::Piecewise<Geom::D2<Geom::SBasis> >
LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
{
index bb3fb31625952bbcad072750412320443ca256c7..5ad9ed6484c45460b342ebd84a849d79dcf5988f 100644 (file)
}
*/
-//TODO: does this already exist in 2Geom? if not, move this there...
-std::vector<Geom::Piecewise<Geom::D2<Geom::SBasis> > >
-split_at_discontinuities (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwsbin, double tol = .0001)
-{
- using namespace Geom;
- std::vector<Piecewise<D2<SBasis> > > ret;
- unsigned piece_start = 0;
- for (unsigned i=0; i<pwsbin.segs.size(); i++){
- if (i==(pwsbin.segs.size()-1) || L2(pwsbin.segs[i].at1()- pwsbin.segs[i+1].at0()) > tol){
- Piecewise<D2<SBasis> > piece;
- piece.cuts.push_back(pwsbin.cuts[piece_start]);
- for (unsigned j = piece_start; j<i+1; j++){
- piece.segs.push_back(pwsbin.segs[j]);
- piece.cuts.push_back(pwsbin.cuts[j+1]);
- }
- ret.push_back(piece);
- piece_start = i+1;
- }
- }
- return ret;
-}
+
//This returns a random perturbation. Notice the domain is [s0,s0+first multiple of period>s1]...
Geom::Piecewise<Geom::D2<Geom::SBasis> >