Classes | Typedefs | Functions | Variables

bezier Namespace Reference
[Bezier Curves]

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_tvec_point_t
typedef std::vector
< quad_bezier_t
quad_path_t
typedef std::vector< curve_tpath_t
typedef path_t cubic_path_t

Functions

static int findRoots (float a, float b, float c, float *roots) throw ()
static void checkBoundaries (float &min, float &max, float value) throw ()
void getRect (const curve_t &curve, rect_t &rect) throw ()
void scale (curve_t &curve, float factor) throw ()
static float writeVal (float x, float eps) throw ()
void write (const curve_t &curve, std::string &value, float eps) throw ()
void read (const char *value, curve_t &curve)
void getCurveFromControlPoints (const control_points_t &cp, curve_t &b) throw ()
void getControlPointsFromCurve (const curve_t &b, control_points_t &cp) throw ()
static point_t getTangent (const point_t *p, int nPoints, int i) throw ()
void getQuadPathFromRawPoints (const point_t *p,int nPoints,float ds,quad_path_t &path)
 given a set of points, return the best fit path of quadratic beziers
void getCubicPathFromRawPoints (const point_t *in_p, int nPoints, float ds, cubic_path_t &path)
static void getCubic (float x1, float x2, float x3, float &a, float &b, float &c) throw ()
static void leastSquaresFit (const point_t *p, int nPoints, const point_t &q, const point_t &r, control_points_t &cp) throw ()
static void getQR (const point_t *p, int nPoints, point_t &q, point_t &r) throw ()
void addPathSegments (const point_t *p, const point_t &q, const point_t &r, int nPoints, float tolerance, path_t &path)
void fitPoints (const float *x, int nPoints, float slope, fit_t &fit) throw ()
int getCuspIndices (const point_t *p, int nPoints, int **cusps)
float getFitQuality (const point_t *p, int nPoints, const curve_t &curve) throw ()
void fitPath (const point_t *p, int nPoints, float tolerance, path_t &path)
void respacePath (const point_t *p, int nPoints, float dt, point_t **out_p, int &newPoints)
float getCoefficient (const float *x, int nPoints, int degree) throw ()
void removeCoefficient (float *x, int nPoints, float coeff, int degree) throw ()

Variables

static const float s_eps = 1.0e-8

Typedef Documentation

typedef point2d_t<float> bezier::point_t

Definition at line 62 of file bezier.h.

typedef std::vector<point_t> bezier::vec_point_t

Definition at line 38 of file fit.cpp.

typedef std::vector<quad_bezier_t> bezier::quad_path_t

Definition at line 57 of file fit.h.

typedef std::vector<curve_t> bezier::path_t

Definition at line 73 of file fit.h.

Definition at line 75 of file fit.h.


Function Documentation

static int bezier::findRoots ( float  a,
float  b,
float  c,
float *  roots 
) throw () [static]

Definition at line 54 of file bezier.cpp.

static void bezier::checkBoundaries ( float &  min,
float &  max,
float  value 
) throw () [static]

Definition at line 115 of file bezier.cpp.

static float bezier::writeVal ( float  x,
float  eps 
) throw () [static]

Definition at line 217 of file bezier.cpp.

static point_t bezier::getTangent ( const point_t p,
int  nPoints,
int  i 
) throw () [static]

Definition at line 48 of file fit.cpp.

void bezier::getQuadPathFromRawPoints ( const point_t in_p,
int  nPoints,
float  ds,
quad_path_t &  path 
)

given a set of points, return the best fit path of quadratic beziers

void bezier::getCubicPathFromRawPoints ( const point_t in_p,
int  nPoints,
float  ds,
cubic_path_t &  path 
)
static void bezier::getCubic ( float  x1,
float  x2,
float  x3,
float &  a,
float &  b,
float &  c 
) throw () [static]

Definition at line 213 of file fit.cpp.

static void bezier::leastSquaresFit ( const point_t p,
int  nPoints,
const point_t q,
const point_t r,
control_points_t &  cp 
) throw () [static]

Definition at line 239 of file fit.cpp.

static void bezier::getQR ( const point_t p,
int  nPoints,
point_t q,
point_t r 
) throw () [static]

Definition at line 369 of file fit.cpp.

void bezier::addPathSegments ( const point_t p,
const point_t q,
const point_t r,
int  nPoints,
float  tolerance,
path_t &  path 
)

Definition at line 391 of file fit.cpp.

void bezier::fitPoints ( const float *  x,
int  nPoints,
float  slope,
fit_t &  fit 
) throw ()
int bezier::getCuspIndices ( const point_t p,
int  nPoints,
int **  cusps 
)
float bezier::getFitQuality ( const point_t p,
int  nPoints,
const curve_t &  curve 
) throw ()
void bezier::fitPath ( const point_t p,
int  nPoints,
float  tolerance,
path_t &  path 
)
void bezier::respacePath ( const point_t p,
int  nPoints,
float  dt,
point_t **  out_p,
int &  newPoints 
)
float bezier::getCoefficient ( const float *  x,
int  nPoints,
int  degree 
) throw ()
void bezier::removeCoefficient ( float *  x,
int  nPoints,
float  coeff,
int  degree 
) throw ()

Variable Documentation

const float bezier::s_eps = 1.0e-8 [static]

Definition at line 39 of file bezier.cpp.