solver.h revision 981b809bc6ed10a21e89444d9447e5475801874f
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen#ifndef _SOLVE_SBASIS_H
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen#define _SOLVE_SBASIS_H
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen#include "point.h"
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen#include "sbasis.h"
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen
981b809bc6ed10a21e89444d9447e5475801874fjohanengelennamespace Geom{
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenunsigned
981b809bc6ed10a21e89444d9447e5475801874fjohanengelencrossing_count(Geom::Point const *V, /* Control pts of Bezier curve */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned degree); /* Degree of Bezier curve */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenvoid
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenfind_parametric_bezier_roots(
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen Geom::Point const *w, /* The control points */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned degree, /* The degree of the polynomial */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen std::vector<double> & solutions, /* RETURN candidate t-values */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned depth); /* The depth of the recursion */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenunsigned
981b809bc6ed10a21e89444d9447e5475801874fjohanengelencrossing_count(double const *V, /* Control pts of Bezier curve */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned degree, /* Degree of Bezier curve */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen double left_t, double right_t);
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenvoid
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenfind_bernstein_roots(
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen double *w, /* The control points */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned degree, /* The degree of the polynomial */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen std::vector<double> & solutions, /* RETURN candidate t-values */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned depth, /* The depth of the recursion */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen double left_t=0, double right_t=1);
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenvoid
981b809bc6ed10a21e89444d9447e5475801874fjohanengelenfind_bernstein_roots_buggy(
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen double *w, /* The control points */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned degree, /* The degree of the polynomial */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen std::vector<double> & solutions, /* RETURN candidate t-values */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen unsigned depth, /* The depth of the recursion */
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen double left_t=0, double right_t=1);
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen};
981b809bc6ed10a21e89444d9447e5475801874fjohanengelen#endif