Classes | |
struct | curve_t |
paramaterized bezier curve More... | |
struct | control_points_t |
bezier curve specified by control points More... | |
struct | fit_t |
struct | quad_bezier_t |
quadratic bezier curve More... | |
Typedefs | |
typedef point2d_t< float > | point_t |
typedef rect2d_t< float > | rect_t |
typedef std::vector< point_t > | vec_point_t |
typedef std::vector < quad_bezier_t > | quad_path_t |
typedef std::vector< curve_t > | path_t |
typedef path_t | cubic_path_t |
Functions | |
static int | findRoots (IN float a, IN float b, IN float c, OUT float *roots) throw () |
static void | checkBoundaries (IO float &min, IO float &max, IN float value) throw () |
void | getRect (IN const curve_t &curve, OUT rect_t &rect) throw () |
void | scale (IO curve_t &curve, IN float factor) throw () |
static float | writeVal (IN float x, IN float eps) throw () |
void | write (IN const curve_t &curve, OUT std::string &value, IN float eps) throw () |
void | read (IN const char *value, OUT curve_t &curve) |
void | getCurveFromControlPoints (IN const control_points_t &cp, OUT curve_t &b) throw () |
void | getControlPointsFromCurve (IN const curve_t &b, OUT control_points_t &cp) throw () |
static point_t | getTangent (IN const point_t *p, IN int nPoints, IN int i) throw () |
void | getQuadPathFromRawPoints (IN const point_t *p, IN int nPoints, IN float ds, OUT quad_path_t &path) |
given a set of points, return the best fit path of quadratic beziers | |
void | getCubicPathFromRawPoints (IN const point_t *in_p, IN int nPoints, IN float ds, OUT cubic_path_t &path) |
static void | getCubic (IN float x1, IN float x2, IN float x3, OUT float &a, OUT float &b, OUT float &c) throw () |
static void | leastSquaresFit (IN const point_t *p, IN int nPoints, IN const point_t &q, IN const point_t &r, OUT control_points_t &cp) throw () |
static void | getQR (IN const point_t *p, IN int nPoints, OUT point_t &q, OUT point_t &r) throw () |
void | addPathSegments (IN const point_t *p, IN const point_t &q, IN const point_t &r, IN int nPoints, IN float tolerance, IO path_t &path) |
void | fitPoints (IN const float *x, IN int nPoints, IN float slope, OUT fit_t &fit) throw () |
int | getCuspIndices (IN const point_t *p, IN int nPoints, OUT int **cusps) |
float | getFitQuality (IN const point_t *p, IN int nPoints, IN const curve_t &curve) throw () |
void | fitPath (IN const point_t *p, IN int nPoints, IN float tolerance, OUT path_t &path) |
void | respacePath (IN const point_t *p, IN int nPoints, IN float dt, OUT point_t **out_p, OUT int &newPoints) |
float | getCoefficient (IN const float *x, IN int nPoints, IN int degree) throw () |
void | removeCoefficient (IO float *x, IN int nPoints, IN float coeff, IN int degree) throw () |
Variables | |
static const float | s_eps = 1.0e-8 |
typedef point2d_t<float> bezier::point_t |
typedef std::vector<point_t> bezier::vec_point_t |
typedef std::vector<quad_bezier_t> bezier::quad_path_t |
typedef std::vector<curve_t> bezier::path_t |
typedef path_t bezier::cubic_path_t |
static int bezier::findRoots | ( | IN float | a, | |
IN float | b, | |||
IN float | c, | |||
OUT float * | roots | |||
) | throw () [static] |
Definition at line 54 of file bezier.cpp.
static void bezier::checkBoundaries | ( | IO float & | min, | |
IO float & | max, | |||
IN float | value | |||
) | throw () [static] |
Definition at line 115 of file bezier.cpp.
static float bezier::writeVal | ( | IN float | x, | |
IN float | eps | |||
) | throw () [static] |
Definition at line 217 of file bezier.cpp.
static point_t bezier::getTangent | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
IN int | i | |||
) | throw () [static] |
void bezier::getQuadPathFromRawPoints | ( | IN const point_t * | in_p, | |
IN int | nPoints, | |||
IN float | ds, | |||
OUT quad_path_t & | path | |||
) |
given a set of points, return the best fit path of quadratic beziers
void bezier::getCubicPathFromRawPoints | ( | IN const point_t * | in_p, | |
IN int | nPoints, | |||
IN float | ds, | |||
OUT cubic_path_t & | path | |||
) |
static void bezier::getCubic | ( | IN float | x1, | |
IN float | x2, | |||
IN float | x3, | |||
OUT float & | a, | |||
OUT float & | b, | |||
OUT float & | c | |||
) | throw () [static] |
static void bezier::leastSquaresFit | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
IN const point_t & | q, | |||
IN const point_t & | r, | |||
OUT control_points_t & | cp | |||
) | throw () [static] |
static void bezier::getQR | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
OUT point_t & | q, | |||
OUT point_t & | r | |||
) | throw () [static] |
void bezier::addPathSegments | ( | IN const point_t * | p, | |
IN const point_t & | q, | |||
IN const point_t & | r, | |||
IN int | nPoints, | |||
IN float | tolerance, | |||
IO path_t & | path | |||
) |
void bezier::fitPoints | ( | IN const float * | x, | |
IN int | nPoints, | |||
IN float | slope, | |||
OUT fit_t & | fit | |||
) | throw () |
int bezier::getCuspIndices | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
OUT int ** | cusps | |||
) |
float bezier::getFitQuality | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
IN const curve_t & | curve | |||
) | throw () |
void bezier::fitPath | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
IN float | tolerance, | |||
OUT path_t & | path | |||
) |
void bezier::respacePath | ( | IN const point_t * | p, | |
IN int | nPoints, | |||
IN float | dt, | |||
OUT point_t ** | out_p, | |||
OUT int & | newPoints | |||
) |
float bezier::getCoefficient | ( | IN const float * | x, | |
IN int | nPoints, | |||
IN int | degree | |||
) | throw () |
void bezier::removeCoefficient | ( | IO float * | x, | |
IN int | nPoints, | |||
IN float | coeff, | |||
IN int | degree | |||
) | throw () |
const float bezier::s_eps = 1.0e-8 [static] |
Definition at line 39 of file bezier.cpp.