# bezier< V, T > Class Template Reference

`#include <_bezier.h>`

Inheritance diagram for bezier< V, T >:

List of all members.

## Public Types

typedef V | value_type
typedef T | time_type
typedef float | distance_type
typedef bezier_iterator< V, T > | iterator
typedef bezier_iterator< V, T > | const_iterator

## Public Member Functions

| bezier ()
| bezier (const value_type &a, const value_type &b, const value_type &c, const value_type &d)
const_iterator | begin () const
const_iterator | end () const
time_type | find_closest (bool fast, const value_type &x, int i=7) const
distance_type | find_distance (time_type r, time_type s, int steps=7) const
distance_type | length () const
void | subdivide (bezier *left, bezier *right, const time_type &time=(time_type) 0.5) const
void | evaluate (time_type t, value_type &f, value_type &df) const

## Public Attributes

distance_func< value_type > | dist

## Static Private Member Functions

static value_type | Bezier (value_type *VT, int degree, time_type t, value_type *Left, value_type *Right)
static int | CrossingCount (value_type *VT)
static int | ControlPolygonFlatEnough (value_type *VT)
static time_type | ComputeXIntercept (value_type *VT)
static int | FindRoots (value_type *w, time_type *t, int depth)
static void | ConvertToBezierForm (const value_type &P, value_type *VT, value_type w[W_DEGREE+1])
static time_type | NearestPointOnCurve (const value_type &P, value_type VT[4])

## Detailed Description

### template<typename V, typename T = float>
class bezier< V, T >

Definition at line 523 of file _bezier.h.

## Member Typedef Documentation

template<typename V, typename T = float>

typedef V bezier< V, T >::value_type

Reimplemented from bezier_base< V, T >.

Reimplemented in hermite< V, T >, and hermite< T >.

Definition at line 526 of file _bezier.h.

template<typename V, typename T = float>

typedef T bezier< V, T >::time_type

Reimplemented from bezier_base< V, T >.

Reimplemented in hermite< V, T >, and hermite< T >.

Definition at line 527 of file _bezier.h.

template<typename V, typename T = float>

typedef float bezier< V, T >::distance_type

Definition at line 528 of file _bezier.h.

template<typename V, typename T = float>

typedef bezier_iterator<V,T> bezier< V, T >::iterator

Definition at line 529 of file _bezier.h.

template<typename V, typename T = float>

typedef bezier_iterator<V,T> bezier< V, T >::const_iterator

Definition at line 530 of file _bezier.h.

## Constructor & Destructor Documentation

template<typename V, typename T = float>

bezier< V, T >::bezier | ( |  | ) | `[inline]`

Definition at line 539 of file _bezier.h.

template<typename V, typename T = float>

bezier< V, T >::bezier | ( | const value_type & | a,
|  | const value_type & | b,
|  | const value_type & | c,
|  | const value_type & | d |
| ) |  |  | `[inline]`

Definition at line 540 of file _bezier.h.

## Member Function Documentation

template<typename V, typename T = float>

const_iterator bezier< V, T >::begin | ( |  | ) | const

template<typename V, typename T = float>

const_iterator bezier< V, T >::end | ( |  | ) | const

template<typename V, typename T = float>

time_type bezier< V, T >::find_closest | ( | bool | fast,
|  | const value_type & | x,
|  | int | i = `7` |
| ) |  |  | const`[inline]`

Definition at line 547 of file _bezier.h.

template<typename V, typename T = float>

distance_type bezier< V, T >::find_distance | ( | time_type | r,
|  | time_type | s,
|  | int | steps = `7` |
| ) |  |  | const`[inline]`

Definition at line 577 of file _bezier.h.

Referenced by bezier< T, float >::length().

template<typename V, typename T = float>

distance_type bezier< V, T >::length | ( |  | ) | const`[inline]`

Definition at line 595 of file _bezier.h.

template<typename V, typename T = float>

void bezier< V, T >::subdivide | ( | bezier< V, T > * | left,
|  | bezier< V, T > * | right,
|  | const time_type & | time = `(time_type)0.5` |
| ) |  |  | const`[inline]`

Definition at line 610 of file _bezier.h.

template<typename V, typename T = float>

void bezier< V, T >::evaluate | ( | time_type | t,
|  | value_type & | f,
|  | value_type & | df |
| ) |  |  | const`[inline]`

Definition at line 650 of file _bezier.h.

template<typename V, typename T = float>

static value_type bezier< V, T >::Bezier | ( | value_type * | VT,
|  | int | degree,
|  | time_type | t,
|  | value_type * | Left,
|  | value_type * | Right |
| ) |  |  | `[inline, static, private]`

Definition at line 685 of file _bezier.h.

Referenced by bezier< T, float >::FindRoots(), and bezier< T, float >::NearestPointOnCurve().

template<typename V, typename T = float>

static int bezier< V, T >::CrossingCount | ( | value_type * | VT | ) | `[inline, static, private]`

Definition at line 720 of file _bezier.h.

Referenced by bezier< T, float >::FindRoots().

template<typename V, typename T = float>

static int bezier< V, T >::ControlPolygonFlatEnough | ( | value_type * | VT | ) | `[inline, static, private]`

Definition at line 744 of file _bezier.h.

Referenced by bezier< T, float >::FindRoots().

template<typename V, typename T = float>

static time_type bezier< V, T >::ComputeXIntercept | ( | value_type * | VT | ) | `[inline, static, private]`

Definition at line 805 of file _bezier.h.

Referenced by bezier< T, float >::FindRoots().

template<typename V, typename T = float>

static int bezier< V, T >::FindRoots | ( | value_type * | w,
|  | time_type * | t,
|  | int | depth |
| ) |  |  | `[inline, static, private]`

Definition at line 821 of file _bezier.h.

Referenced by bezier< T, float >::FindRoots(), and bezier< T, float >::NearestPointOnCurve().

template<typename V, typename T = float>

static void bezier< V, T >::ConvertToBezierForm | ( | const value_type & | P,
|  | value_type * | VT,
|  | value_type | w[W_DEGREE+1] |
| ) |  |  | `[inline, static, private]`

Definition at line 878 of file _bezier.h.

Referenced by bezier< T, float >::NearestPointOnCurve().

template<typename V, typename T = float>

static time_type bezier< V, T >::NearestPointOnCurve | ( | const value_type & | P,
|  | value_type | VT[4] |
| ) |  |  | `[inline, static, private]`

Definition at line 937 of file _bezier.h.

Referenced by bezier< T, float >::find_closest().

## Member Data Documentation

template<typename V, typename T = float>

distance_func<value_type> bezier< V, T >::dist

Definition at line 532 of file _bezier.h.

Referenced by bezier< T, float >::find_closest(), bezier< T, float >::find_distance(), and bezier< T, float >::NearestPointOnCurve().

The documentation for this class was generated from the following file:

- _bezier.h