Inkscape
Vector Graphics Editor
|
Polynomial in Bernstein-Bezier basis. More...
#include <bezier.h>
Classes | |
struct | Order |
Public Types | |
typedef Coord | output_type |
Public Member Functions | |
unsigned | order () const |
unsigned | degree () const |
unsigned | size () const |
Bezier () | |
Bezier (const Bezier &b) | |
Bezier & | operator= (Bezier const &other) |
bool | operator== (Bezier const &other) const |
bool | operator!= (Bezier const &other) const |
Bezier (Order ord) | |
void | resize (unsigned int n, Coord v=0) |
void | clear () |
bool | isZero (double eps=EPSILON) const |
bool | isConstant (double eps=EPSILON) const |
bool | isFinite () const |
Coord | at0 () const |
Coord & | at0 () |
Coord | at1 () const |
Coord & | at1 () |
Coord | valueAt (double t) const |
Coord | operator() (double t) const |
SBasis | toSBasis () const |
Coord & | operator[] (unsigned ix) |
Coord const & | operator[] (unsigned ix) const |
void | setCoeff (unsigned ix, double val) |
std::vector< Coord > | valueAndDerivatives (Coord t, unsigned n_derivs) const |
void | subdivide (Coord t, Bezier *left, Bezier *right) const |
std::pair< Bezier, Bezier > | subdivide (Coord t) const |
std::vector< Coord > | roots () const |
std::vector< Coord > | roots (Interval const &ivl) const |
Bezier | forward_difference (unsigned k) const |
Bezier | elevate_degree () const |
Bezier | reduce_degree () const |
Bezier | elevate_to_degree (unsigned newDegree) const |
Bezier | deflate () const |
Bezier & | operator+= (double v) |
Bezier & | operator-= (double v) |
Bezier & | operator*= (double v) |
Bezier & | operator/= (double v) |
Bezier & | operator+= (Bezier const &other) |
Bezier & | operator-= (Bezier const &other) |
Bezier | operator- () const |
Unary minus. | |
Construct Bezier polynomials from their control points | |
Bezier (Coord c0) | |
Bezier (Coord c0, Coord c1) | |
Bezier (Coord c0, Coord c1, Coord c2) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6, Coord c7) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6, Coord c7, Coord c8) | |
Bezier (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6, Coord c7, Coord c8, Coord c9) | |
template<typename Iter > | |
Bezier (Iter first, Iter last) | |
Bezier (std::vector< Coord > const &vec) | |
Protected Member Functions | |
Bezier (Coord const c[], unsigned ord) | |
Private Member Functions | |
void | find_bezier_roots (std::vector< double > &solutions, double l, double r) const |
Private Attributes | |
std::valarray< Coord > | c_ |
Friends | |
class | Bernstein |
Bezier | portion (const Bezier &a, Coord from, Coord to) |
OptInterval | bounds_fast (Bezier const &b) |
Bezier | derivative (const Bezier &a) |
typedef Coord Geom::Bezier::output_type |
|
inlineprotected |
|
inline |
Definition at line 186 of file bezier.h.
References order(), and Geom::Bezier::Order::order.
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
Definition at line 272 of file bezier.h.
References c_.
Referenced by Geom::bounds_exact(), Geom::Piecewise< T >::integral(), TEST_F(), TEST_F(), and wrap_bezier().
|
inline |
|
inline |
Definition at line 274 of file bezier.h.
Referenced by Geom::bounds_exact(), TEST_F(), and wrap_bezier().
|
inline |
Definition at line 248 of file bezier.h.
References c_.
Referenced by Inkscape::LivePathEffect::LPEMirrorSymmetry::doEffect_path(), Geom::sbasis_to_bezier(), and Inkscape::LivePathEffect::LPESlice::splititem().
Bezier Geom::Bezier::deflate | ( | ) | const |
Definition at line 176 of file bezier.cpp.
Referenced by find_bezier_roots(), and TEST_F().
|
inline |
Definition at line 146 of file bezier.h.
References order().
Referenced by elevate_to_degree(), Geom::find_bernstein_roots(), find_bezier_roots(), operator+=(), operator-=(), and operator==().
Bezier Geom::Bezier::elevate_degree | ( | ) | const |
Definition at line 138 of file bezier.cpp.
References c_, order(), and size().
Referenced by elevate_to_degree(), and TEST_F().
Bezier Geom::Bezier::elevate_to_degree | ( | unsigned | newDegree | ) | const |
Definition at line 167 of file bezier.cpp.
References degree(), and elevate_degree().
Referenced by operator+=(), operator-=(), and TEST_F().
|
private |
Definition at line 40 of file solve-bezier.cpp.
References deflate(), degree(), isConstant(), Geom::sgn(), and solutions.
Referenced by roots().
Bezier Geom::Bezier::forward_difference | ( | unsigned | k | ) | const |
Definition at line 121 of file bezier.cpp.
References Geom::binomial_increment_k(), c_, order(), and size().
|
inline |
Definition at line 260 of file bezier.h.
References Geom::are_near(), c_, and order().
Referenced by find_bezier_roots().
|
inline |
|
inline |
Definition at line 254 of file bezier.h.
References Geom::are_near(), c_, and order().
Referenced by wrap_bezier().
|
inline |
|
inline |
|
inline |
Definition at line 195 of file bezier.cpp.
References c_, degree(), elevate_to_degree(), and size().
|
inline |
|
inline |
Definition at line 208 of file bezier.cpp.
References c_, degree(), elevate_to_degree(), and size().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 145 of file bezier.h.
References c_.
Referenced by at1(), at1(), Bezier(), Geom::bezier_to_sbasis(), deflate(), degree(), elevate_degree(), forward_difference(), Geom::integral(), isConstant(), isFinite(), isZero(), Geom::operator*(), Geom::operator<<(), reduce_degree(), Geom::reverse(), roots(), subdivide(), TEST_F(), valueAndDerivatives(), and valueAt().
Bezier Geom::Bezier::reduce_degree | ( | ) | const |
Definition at line 150 of file bezier.cpp.
|
inline |
Definition at line 245 of file bezier.h.
References c_.
Referenced by operator=(), and Geom::sbasis_to_bezier().
std::vector< Coord > Geom::Bezier::roots | ( | ) | const |
Definition at line 105 of file bezier.cpp.
References find_bezier_roots(), and solutions.
Referenced by Geom::bounds_exact(), Geom::Path::extrema(), Geom::find_self_intersections(), Inkscape::UI::PathManipulator::insertNodeAtExtremum(), Geom::Ellipse::intersect(), TEST_F(), TEST_F(), and TEST_F().
Definition at line 113 of file bezier.cpp.
References c_, Geom::find_bernstein_roots(), Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), order(), and solutions.
|
inline |
|
inline |
Definition at line 147 of file bezier.h.
References c_.
Referenced by are_equal(), bezier_getitem(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doEffect_path(), elevate_degree(), forward_difference(), Geom::NL::LFMBezier::instance(), operator+=(), operator-=(), reduce_degree(), Inkscape::LivePathEffect::LPESlice::splititem(), subdivide(), TEST_F(), TEST_F(), and valueAndDerivatives().
Definition at line 98 of file bezier.cpp.
References subdivide().
Definition at line 79 of file bezier.cpp.
References c_, order(), and size().
Referenced by subdivide(), and TEST_F().
SBasis Geom::Bezier::toSBasis | ( | ) | const |
Definition at line 187 of file bezier.cpp.
References Geom::bezier_to_sbasis().
Referenced by wrap_bezier().
Definition at line 51 of file bezier.cpp.
References Geom::bernstein_value_at(), c_, order(), and size().
Referenced by TEST_F().
|
inline |
Definition at line 277 of file bezier.h.
References Geom::bernstein_value_at(), c_, and order().
Referenced by are_equal(), Geom::bounds_exact(), Inkscape::UI::PathManipulator::insertNodeAtExtremum(), operator()(), Geom::RatQuad::pointAt(), TEST_F(), TEST_F(), and wrap_bezier().
|
friend |
Definition at line 305 of file bezier.cpp.
Definition at line 282 of file bezier.cpp.
Definition at line 250 of file bezier.cpp.
Referenced by Inkscape::LivePathEffect::LPEMirrorSymmetry::doEffect_path(), and Inkscape::LivePathEffect::LPESlice::splititem().
|
private |
Definition at line 128 of file bezier.h.
Referenced by at0(), at0(), at1(), at1(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), Bezier(), clear(), deflate(), elevate_degree(), forward_difference(), isConstant(), isFinite(), isZero(), operator*=(), operator+=(), operator+=(), operator-(), operator-=(), operator-=(), operator/=(), operator=(), operator==(), operator[](), operator[](), order(), reduce_degree(), resize(), roots(), setCoeff(), size(), subdivide(), valueAndDerivatives(), and valueAt().