1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008 Henrik Tidefelt
22 #include "elementarycoords.h"
34 virtual ~Upsampler2D( ){ }
35 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords2D
> & controls
) const = 0;
42 virtual ~Upsampler3D( ){ }
43 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords3D
> & controls
) const = 0;
46 class UpsampleInflections
: public Upsampler2D
49 UpsampleInflections( ){ }
50 virtual ~UpsampleInflections( ){ }
51 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords2D
> & controls
) const;
54 class UpsampleBends
: public Upsampler2D
58 UpsampleBends( double maxAngle
)
59 : maxAngle_( maxAngle
)
61 virtual ~UpsampleBends( ){ }
62 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords2D
> & controls
) const;
65 class UpsampleEvery2D
: public Upsampler2D
67 Concrete::Length period_
;
69 UpsampleEvery2D( Concrete::Length period
)
72 virtual ~UpsampleEvery2D( ){ }
73 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords2D
> & controls
) const;
76 class UpsampleEvery3D
: public Upsampler3D
78 Concrete::Length period_
;
80 UpsampleEvery3D( Concrete::Length period
)
83 virtual ~UpsampleEvery3D( ){ }
84 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords3D
> & controls
) const;
87 class UpsampleDifferentiably2D
: public Upsampler2D
90 UpsampleDifferentiably2D( ){ }
91 virtual ~UpsampleDifferentiably2D( ){ }
92 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords2D
> & controls
) const;
95 class UpsampleDifferentiably3D
: public Upsampler3D
98 UpsampleDifferentiably3D( ){ }
99 virtual ~UpsampleDifferentiably3D( ){ }
100 virtual void operator () ( std::vector
< double > * dst
, const Bezier::ControlPoints
< Concrete::Coords3D
> & controls
) const;