Inkscape
Vector Graphics Editor
|
Functions | |
void | portion (std::vector< Point > &B, Interval const &I) |
void | derivative (std::vector< Point > &D, std::vector< Point > const &B) |
void | print (std::vector< Point > const &cp, const char *msg="") |
template<class charT > | |
std::basic_ostream< charT > & | operator<< (std::basic_ostream< charT > &os, const Interval &I) |
double | angle (std::vector< Point > const &A) |
size_t | get_precision (Interval const &I) |
void | range_assertion (int k, int m, int n, const char *msg) |
double | det (Point const &P1, Point const &P2) |
bool | solve (Point &P, Point const &P1, Point const &P2, Point const &Q) |
void | map_to (Interval &J, Interval const &I) |
bool | is_constant (std::vector< Point > const &A, double precision) |
void | normal (std::vector< Point > &N, std::vector< Point > const &B) |
void | left_portion (Coord t, std::vector< Point > &B) |
void | right_portion (Coord t, std::vector< Point > &B) |
template<typename Tag > | |
OptInterval | clip (std::vector< Point > const &A, std::vector< Point > const &B, double precision) |
template<typename Tag > | |
void | iterate (std::vector< Interval > &domsA, std::vector< Interval > &domsB, std::vector< Point > const &A, std::vector< Point > const &B, Interval const &domA, Interval const &domB, double precision) |
void | orientation_line (std::vector< double > &l, std::vector< Point > const &c, size_t i, size_t j) |
Line | pick_orientation_line (std::vector< Point > const &c, double precision) |
Line | orthogonal_orientation_line (std::vector< Point > const &c, Point const &p, double precision) |
double | signed_distance (Point const &p, Line const &l) |
Interval | fat_line_bounds (std::vector< Point > const &c, Line const &l) |
double | intersect (Point const &p1, Point const &p2, double y) |
OptInterval | clip_interval (std::vector< Point > const &B, Line const &l, Interval const &bound) |
template<> | |
OptInterval | clip< intersection_point_tag > (std::vector< Point > const &A, std::vector< Point > const &B, double precision) |
void | make_focus (std::vector< Point > &F, std::vector< Point > const &B) |
void | distance_control_points (std::vector< Point > &D, std::vector< Point > const &B, std::vector< Point > const &F) |
OptInterval | clip_interval (std::vector< Point > const &B, std::vector< Point > const &F) |
template<> | |
OptInterval | clip< collinear_normal_tag > (std::vector< Point > const &A, std::vector< Point > const &B, double) |
template<> | |
void | iterate< intersection_point_tag > (std::vector< Interval > &domsA, std::vector< Interval > &domsB, std::vector< Point > const &A, std::vector< Point > const &B, Interval const &domA, Interval const &domB, double precision) |
template<> | |
void | iterate< collinear_normal_tag > (std::vector< Interval > &domsA, std::vector< Interval > &domsB, std::vector< Point > const &A, std::vector< Point > const &B, Interval const &domA, Interval const &domB, double precision) |
template<typename Tag > | |
void | get_solutions (std::vector< std::pair< double, double > > &xs, std::vector< Point > const &A, std::vector< Point > const &B, double precision) |
void | print (std::vector< Point > const &cp) |
void | pick_orientation_line (std::vector< double > &l, std::vector< Point > const &c) |
double | distance (Point const &P, std::vector< double > const &l) |
void | fat_line_bounds (Interval &bound, std::vector< Point > const &c, std::vector< double > const &l) |
void | clip (Interval &dom, std::vector< Point > const &B, std::vector< double > const &l, Interval const &bound) |
Interval | make_empty_interval () |
const Interval | H2_INTERVAL (0.5+MAX_PRECISION, 1.0) |
void | intersection (std::vector< Interval > &domsA, std::vector< Interval > &domsB, std::vector< Point > const &A, std::vector< Point > const &B, Interval const &domA, Interval const &domB, double precision) |
Variables | |
const double | MAX_PRECISION = 1e-8 |
const double | MIN_CLIPPED_SIZE_THRESHOLD = 0.8 |
const Interval | UNIT_INTERVAL (0, 1) |
const OptInterval | EMPTY_INTERVAL = make_empty_interval() |
const Interval | H1_INTERVAL (0, 0.5) |
const Interval | H2_INTERVAL (nextafter(0.5, 1.0), 1.0) |
|
inline |
Definition at line 81 of file bezier-clipping.cpp.
References Geom::X, and Geom::Y.
Referenced by iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
void Geom::detail::bezier_clipping::clip | ( | Interval & | dom, |
std::vector< Point > const & | B, | ||
std::vector< double > const & | l, | ||
Interval const & | bound | ||
) |
Definition at line 208 of file intersection-by-bezier-clipping.cpp.
References D, distance(), intersect(), Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), Geom::X, and Geom::Y.
OptInterval Geom::detail::bezier_clipping::clip | ( | std::vector< Point > const & | A, |
std::vector< Point > const & | B, | ||
double | precision | ||
) |
Referenced by intersection().
OptInterval Geom::detail::bezier_clipping::clip< collinear_normal_tag > | ( | std::vector< Point > const & | A, |
std::vector< Point > const & | B, | ||
double | |||
) |
Definition at line 711 of file bezier-clipping.cpp.
References clip_interval(), and make_focus().
Referenced by iterate< collinear_normal_tag >().
OptInterval Geom::detail::bezier_clipping::clip< intersection_point_tag > | ( | std::vector< Point > const & | A, |
std::vector< Point > const & | B, | ||
double | precision | ||
) |
Definition at line 480 of file bezier-clipping.cpp.
References clip_interval(), fat_line_bounds(), is_constant(), Geom::middle_point(), Geom::Line::normalize(), orthogonal_orientation_line(), and pick_orientation_line().
Referenced by iterate< intersection_point_tag >().
OptInterval Geom::detail::bezier_clipping::clip_interval | ( | std::vector< Point > const & | B, |
Line const & | l, | ||
Interval const & | bound | ||
) |
Definition at line 379 of file bezier-clipping.cpp.
References D, intersect(), Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), signed_distance(), Geom::ConvexHull::size(), Geom::ConvexHull::swap(), Geom::X, and Geom::Y.
Referenced by clip< collinear_normal_tag >(), and clip< intersection_point_tag >().
OptInterval Geom::detail::bezier_clipping::clip_interval | ( | std::vector< Point > const & | B, |
std::vector< Point > const & | F | ||
) |
Definition at line 639 of file bezier-clipping.cpp.
References D, distance_control_points(), intersect(), Geom::ConvexHull::size(), Geom::ConvexHull::swap(), Geom::X, and Geom::Y.
Definition at line 121 of file bezier-clipping.cpp.
References Geom::X, and Geom::Y.
Referenced by solve().
|
inline |
Definition at line 163 of file intersection-by-bezier-clipping.cpp.
References Geom::X, and Geom::Y.
Referenced by clip(), and fat_line_bounds().
void Geom::detail::bezier_clipping::distance_control_points | ( | std::vector< Point > & | D, |
std::vector< Point > const & | B, | ||
std::vector< Point > const & | F | ||
) |
Definition at line 545 of file bezier-clipping.cpp.
References Geom::binomial_decrement_k(), Geom::binomial_increment_k(), D, and Geom::dot().
Referenced by clip_interval().
|
inline |
Definition at line 174 of file intersection-by-bezier-clipping.cpp.
References c, and distance().
Interval Geom::detail::bezier_clipping::fat_line_bounds | ( | std::vector< Point > const & | c, |
Line const & | l | ||
) |
Definition at line 351 of file bezier-clipping.cpp.
References c, Geom::GenericInterval< C >::expandTo(), and signed_distance().
Referenced by clip< intersection_point_tag >(), and intersection().
|
inline |
Definition at line 88 of file bezier-clipping.cpp.
Referenced by get_solutions().
void Geom::detail::bezier_clipping::get_solutions | ( | std::vector< std::pair< double, double > > & | xs, |
std::vector< Point > const & | A, | ||
std::vector< Point > const & | B, | ||
double | precision | ||
) |
Definition at line 1084 of file bezier-clipping.cpp.
References get_precision(), and UNIT_INTERVAL.
const Interval Geom::detail::bezier_clipping::H2_INTERVAL | ( | 0.5+ | MAX_PRECISION, |
1. | 0 | ||
) |
|
inline |
Definition at line 365 of file bezier-clipping.cpp.
References Geom::X, and Geom::Y.
Referenced by clip(), clip_interval(), and clip_interval().
void Geom::detail::bezier_clipping::intersection | ( | std::vector< Interval > & | domsA, |
std::vector< Interval > & | domsB, | ||
std::vector< Point > const & | A, | ||
std::vector< Point > const & | B, | ||
Interval const & | domA, | ||
Interval const & | domB, | ||
double | precision | ||
) |
Definition at line 375 of file intersection-by-bezier-clipping.cpp.
References clip(), EMPTY_INTERVAL, Geom::GenericInterval< C >::extent(), fat_line_bounds(), H1_INTERVAL, H2_INTERVAL, intersection(), is_constant(), map_to(), Geom::GenericInterval< C >::max(), MAX_PRECISION, Geom::GenericInterval< C >::min(), MIN_CLIPPED_SIZE_THRESHOLD, pick_orientation_line(), and portion().
Referenced by intersection().
|
inline |
Definition at line 159 of file bezier-clipping.cpp.
References Geom::are_near().
Referenced by clip< intersection_point_tag >(), intersection(), iterate< collinear_normal_tag >(), iterate< intersection_point_tag >(), and orthogonal_orientation_line().
void Geom::detail::bezier_clipping::iterate | ( | std::vector< Interval > & | domsA, |
std::vector< Interval > & | domsB, | ||
std::vector< Point > const & | A, | ||
std::vector< Point > const & | B, | ||
Interval const & | domA, | ||
Interval const & | domB, | ||
double | precision | ||
) |
void Geom::detail::bezier_clipping::iterate< collinear_normal_tag > | ( | std::vector< Interval > & | domsA, |
std::vector< Interval > & | domsB, | ||
std::vector< Point > const & | A, | ||
std::vector< Point > const & | B, | ||
Interval const & | domA, | ||
Interval const & | domB, | ||
double | precision | ||
) |
Definition at line 906 of file bezier-clipping.cpp.
References angle(), clip< collinear_normal_tag >(), counter, Geom::GenericOptInterval< C >::empty(), Geom::GenericInterval< C >::extent(), H1_INTERVAL, H2_INTERVAL, is_constant(), iterate< collinear_normal_tag >(), map_to(), MAX_PRECISION, MIN_CLIPPED_SIZE_THRESHOLD, and portion().
Referenced by iterate< collinear_normal_tag >().
void Geom::detail::bezier_clipping::iterate< intersection_point_tag > | ( | std::vector< Interval > & | domsA, |
std::vector< Interval > & | domsB, | ||
std::vector< Point > const & | A, | ||
std::vector< Point > const & | B, | ||
Interval const & | domA, | ||
Interval const & | domB, | ||
double | precision | ||
) |
Definition at line 747 of file bezier-clipping.cpp.
References angle(), Geom::are_near(), clip< intersection_point_tag >(), counter, Geom::GenericOptInterval< C >::empty(), Geom::GenericInterval< C >::extent(), H1_INTERVAL, H2_INTERVAL, is_constant(), iterate< intersection_point_tag >(), map_to(), MAX_PRECISION, Geom::middle_point(), MIN_CLIPPED_SIZE_THRESHOLD, portion(), and print().
Referenced by iterate< intersection_point_tag >().
Definition at line 209 of file bezier-clipping.cpp.
References Geom::lerp().
Referenced by portion().
|
inline |
Definition at line 341 of file intersection-by-bezier-clipping.cpp.
void Geom::detail::bezier_clipping::make_focus | ( | std::vector< Point > & | F, |
std::vector< Point > const & | B | ||
) |
Definition at line 504 of file bezier-clipping.cpp.
References c, normal(), and solve().
Referenced by clip< collinear_normal_tag >().
Definition at line 146 of file bezier-clipping.cpp.
References Geom::GenericInterval< C >::setEnds(), and Geom::Interval::valueAt().
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
void Geom::detail::bezier_clipping::normal | ( | std::vector< Point > & | N, |
std::vector< Point > const & | B | ||
) |
Definition at line 196 of file bezier-clipping.cpp.
References derivative(), N, and Geom::rot90().
Referenced by make_focus().
|
inline |
Definition at line 66 of file bezier-clipping.cpp.
References msg.
|
inline |
Definition at line 284 of file bezier-clipping.cpp.
References c, Geom::cross(), Geom::length(), Geom::X, and Geom::Y.
Referenced by pick_orientation_line().
Line Geom::detail::bezier_clipping::orthogonal_orientation_line | ( | std::vector< Point > const & | c, |
Point const & | p, | ||
double | precision | ||
) |
Definition at line 325 of file bezier-clipping.cpp.
References c, Geom::Point::cw(), and is_constant().
Referenced by clip< intersection_point_tag >().
|
inline |
Definition at line 141 of file intersection-by-bezier-clipping.cpp.
References Geom::are_near(), c, and orientation_line().
Line Geom::detail::bezier_clipping::pick_orientation_line | ( | std::vector< Point > const & | c, |
double | precision | ||
) |
Definition at line 302 of file bezier-clipping.cpp.
References Geom::are_near(), and c.
Referenced by clip< intersection_point_tag >(), and intersection().
Definition at line 241 of file bezier-clipping.cpp.
References left_portion(), and right_portion().
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
|
inline |
Definition at line 60 of file intersection-by-bezier-clipping.cpp.
void Geom::detail::bezier_clipping::print | ( | std::vector< Point > const & | cp, |
const char * | msg = "" |
||
) |
Definition at line 66 of file bezier-clipping.cpp.
Referenced by iterate< intersection_point_tag >().
void Geom::detail::bezier_clipping::range_assertion | ( | int | k, |
int | m, | ||
int | n, | ||
const char * | msg | ||
) |
Definition at line 102 of file bezier-clipping.cpp.
References msg.
Definition at line 225 of file bezier-clipping.cpp.
References Geom::lerp().
Referenced by portion().
Definition at line 339 of file bezier-clipping.cpp.
References c, Geom::Line::coefficients(), Geom::X, and Geom::Y.
Referenced by clip_interval(), and fat_line_bounds().
bool Geom::detail::bezier_clipping::solve | ( | Point & | P, |
Point const & | P1, | ||
Point const & | P2, | ||
Point const & | Q | ||
) |
Definition at line 130 of file bezier-clipping.cpp.
References det(), Geom::X, and Geom::Y.
Referenced by make_focus().
const Interval Geom::detail::bezier_clipping::EMPTY_INTERVAL = make_empty_interval() |
Definition at line 725 of file bezier-clipping.cpp.
Referenced by intersection().
const Interval Geom::detail::bezier_clipping::H1_INTERVAL | ( | 0 | , |
0. | 5 | ||
) |
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
const Interval Geom::detail::bezier_clipping::H2_INTERVAL(nextafter(0.5, 1.0), 1.0) | ( | nextafter(0.5, 1.0) | , |
1. | 0 | ||
) |
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
const double Geom::detail::bezier_clipping::MAX_PRECISION = 1e-8 |
Definition at line 722 of file bezier-clipping.cpp.
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
const double Geom::detail::bezier_clipping::MIN_CLIPPED_SIZE_THRESHOLD = 0.8 |
Definition at line 723 of file bezier-clipping.cpp.
Referenced by intersection(), iterate< collinear_normal_tag >(), and iterate< intersection_point_tag >().
const Interval Geom::detail::bezier_clipping::UNIT_INTERVAL | ( | 0 | , |
1 | |||
) |
Referenced by get_solutions().