bezier< V, T > Class Template Reference

#include <_bezier.h>

Inheritance diagram for bezier< V, T >:

bezier_base< V, T > hermite< 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_typedist

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 521 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 >.

Definition at line 524 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 >.

Definition at line 525 of file _bezier.h.

template<typename V, typename T = float>
typedef float bezier< V, T >::distance_type

Definition at line 526 of file _bezier.h.

template<typename V, typename T = float>
typedef bezier_iterator<V,T> bezier< V, T >::iterator

Definition at line 527 of file _bezier.h.

template<typename V, typename T = float>
typedef bezier_iterator<V,T> bezier< V, T >::const_iterator

Definition at line 528 of file _bezier.h.


Constructor & Destructor Documentation

template<typename V, typename T = float>
bezier< V, T >::bezier (  )  [inline]

Definition at line 537 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 538 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 545 of file _bezier.h.

References bezier< V, T >::dist, bezier< V, T >::NearestPointOnCurve(), bezier_base< V, T >::operator[](), bezier_base< V, T >::r, and bezier_base< V, T >::s.

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 576 of file _bezier.h.

References bezier< V, T >::dist, and distance_func< T, K >::uncook().

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

template<typename V, typename T = float>
distance_type bezier< V, T >::length (  )  const [inline]

Definition at line 593 of file _bezier.h.

References bezier< V, T >::find_distance(), bezier_base< V, T >::get_r(), and bezier_base< V, T >::get_s().

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 608 of file _bezier.h.

References bezier_base< V, T >::a, bezier_base< V, T >::affine_func, bezier_base< V, T >::b, bezier_base< V, T >::c, bezier_base< V, T >::d, bezier_base< V, T >::get_dt(), bezier_base< V, T >::get_r(), bezier_base< V, T >::get_s(), bezier_base< V, T >::set_r(), bezier_base< V, T >::set_s(), and bezier_base< V, T >::sync().

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 648 of file _bezier.h.

References bezier_base< V, T >::a, bezier_base< V, T >::affine_func, bezier_base< V, T >::b, bezier_base< V, T >::c, bezier_base< V, T >::d, bezier_base< V, T >::get_dt(), and bezier_base< V, T >::get_r().

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 683 of file _bezier.h.

References NULL, and W_DEGREE.

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

template<typename V, typename T = float>
static int bezier< V, T >::CrossingCount ( value_type VT  )  [inline, static, private]

Definition at line 718 of file _bezier.h.

References SGN, and W_DEGREE.

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

template<typename V, typename T = float>
static int bezier< V, T >::ControlPolygonFlatEnough ( value_type VT  )  [inline, static, private]

Definition at line 742 of file _bezier.h.

References bezier_base< V, T >::a, bezier_base< V, T >::b, BEZIER_EPSILON, bezier_base< V, T >::c, MAX, MIN, and W_DEGREE.

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

template<typename V, typename T = float>
static time_type bezier< V, T >::ComputeXIntercept ( value_type VT  )  [inline, static, private]

Definition at line 803 of file _bezier.h.

References W_DEGREE.

Referenced by bezier< V, T >::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 819 of file _bezier.h.

References bezier< V, T >::Bezier(), bezier< V, T >::ComputeXIntercept(), bezier< V, T >::ControlPolygonFlatEnough(), bezier< V, T >::CrossingCount(), MAXDEPTH, and W_DEGREE.

Referenced by bezier< V, T >::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 876 of file _bezier.h.

References bezier_base< V, T >::c, bezier_base< V, T >::d, DEGREE, MAX, MIN, and W_DEGREE.

Referenced by bezier< V, T >::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 935 of file _bezier.h.

References bezier< V, T >::Bezier(), bezier< V, T >::ConvertToBezierForm(), DEGREE, bezier< V, T >::dist, bezier< V, T >::FindRoots(), NULL, and W_DEGREE.

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


Member Data Documentation

template<typename V, typename T = float>
distance_func<value_type> bezier< V, T >::dist

Definition at line 530 of file _bezier.h.

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


The documentation for this class was generated from the following file:
Generated on Fri Jun 22 14:33:39 2007 for ETL by  doxygen 1.5.2