ETL
0.04.19
|
Cubic Bezier Curve Base Class. More...
#include <_bezier.h>
Public Types | |
typedef V | value_type |
typedef T | time_type |
Public Member Functions | |
bezier_base () | |
bezier_base (const value_type &a, const value_type &b, const value_type &c, const value_type &d, const time_type &r=0.0, const time_type &s=1.0) | |
void | sync () |
value_type | operator() (time_type t) const |
void | set_rs (time_type new_r, time_type new_s) |
void | set_r (time_type new_r) |
void | set_s (time_type new_s) |
const time_type & | get_r () const |
const time_type & | get_s () const |
time_type | get_dt () const |
bool | intersect_hull (const bezier_base< value_type, time_type > &) const |
time_type | intersect (const bezier_base< value_type, time_type > &, time_type) const |
Bezier curve intersection function. | |
value_type & | operator[] (int i) |
const value_type & | operator[] (int i) const |
Protected Attributes | |
affine_combo< value_type, time_type > | affine_func |
Private Attributes | |
value_type | a |
value_type | b |
value_type | c |
value_type | d |
time_type | r |
time_type | s |
Cubic Bezier Curve Base Class.
typedef V bezier_base< V, T >::value_type |
typedef T bezier_base< V, T >::time_type |
|
inline |
|
inline |
|
inline |
Reimplemented in hermite< V, T >, and hermite< T >.
Definition at line 91 of file _bezier.h.
Referenced by bezier_base< T, float >::bezier_base(), bezier_base< float, float >::bezier_base(), bezier_base< double, float >::bezier_base(), and bezier< T, float >::subdivide().
|
inline |
|
inline |
|
inline |
Definition at line 132 of file _bezier.h.
Referenced by bezier< T, float >::subdivide().
|
inline |
Definition at line 133 of file _bezier.h.
Referenced by bezier< T, float >::subdivide().
|
inline |
Definition at line 134 of file _bezier.h.
Referenced by bezier< T, float >::evaluate(), bezier< T, float >::length(), and bezier< T, float >::subdivide().
|
inline |
Definition at line 135 of file _bezier.h.
Referenced by bezier< T, float >::length(), and bezier< T, float >::subdivide().
|
inline |
Definition at line 136 of file _bezier.h.
Referenced by bezier< T, float >::evaluate(), and bezier< T, float >::subdivide().
|
inline |
|
inline |
Bezier curve intersection function.
Calculates the time of intersection for the calling curve.
I still have not figured out a good generic method of doing this for a bi-infinite cubic bezier curve calculated with the DeCasteljau algorithm.
One method, although it does not work for the entire bi-infinite curve, is to iteratively intersect the hulls. However, we would only detect intersections that occur between R and S.
It is entirely possible that a new construct similar to the affine combination function will be necessary for this to work properly.
For now, this function is BROKEN. (although it works for the floating-point specializations, using newton's method)
|
inline |
Definition at line 215 of file _bezier.h.
Referenced by bezier< T, float >::find_closest(), and hermite< T >::sync().
|
inline |
|
private |
Definition at line 78 of file _bezier.h.
Referenced by bezier< T, float >::ControlPolygonFlatEnough(), bezier< T, float >::evaluate(), bezier_base< T, float >::operator()(), bezier_base< T, float >::operator[](), bezier_base< float, float >::operator[](), bezier_base< double, float >::operator[](), bezier< T, float >::subdivide(), bezier_base< float, float >::sync(), and bezier_base< double, float >::sync().
|
private |
Definition at line 78 of file _bezier.h.
Referenced by bezier< T, float >::ControlPolygonFlatEnough(), bezier< T, float >::evaluate(), bezier_base< T, float >::operator()(), bezier< T, float >::subdivide(), bezier_base< float, float >::sync(), and bezier_base< double, float >::sync().
|
private |
Definition at line 78 of file _bezier.h.
Referenced by bezier< T, float >::ControlPolygonFlatEnough(), bezier< T, float >::ConvertToBezierForm(), bezier< T, float >::evaluate(), bezier_base< T, float >::operator()(), bezier< T, float >::subdivide(), bezier_base< float, float >::sync(), and bezier_base< double, float >::sync().
|
private |
Definition at line 78 of file _bezier.h.
Referenced by bezier< T, float >::ConvertToBezierForm(), bezier< T, float >::evaluate(), bezier_base< T, float >::operator()(), bezier< T, float >::subdivide(), bezier_base< float, float >::sync(), and bezier_base< double, float >::sync().
|
private |
Definition at line 79 of file _bezier.h.
Referenced by bezier< T, float >::find_closest(), bezier_base< T, float >::get_dt(), bezier_base< float, float >::get_dt(), bezier_base< double, float >::get_dt(), bezier_base< T, float >::get_r(), bezier_base< float, float >::get_r(), bezier_base< double, float >::get_r(), bezier_base< float, float >::intersect(), bezier_base< double, float >::intersect(), bezier_base< T, float >::operator()(), bezier_base< float, float >::operator()(), bezier_base< double, float >::operator()(), bezier_base< T, float >::set_r(), bezier_base< float, float >::set_r(), bezier_base< double, float >::set_r(), bezier_base< T, float >::set_rs(), bezier_base< float, float >::set_rs(), bezier_base< double, float >::set_rs(), bezier_base< float, float >::set_s(), and bezier_base< double, float >::set_s().
|
private |
Definition at line 79 of file _bezier.h.
Referenced by bezier< T, float >::find_closest(), bezier< T, float >::find_distance(), bezier_base< T, float >::get_dt(), bezier_base< float, float >::get_dt(), bezier_base< double, float >::get_dt(), bezier_base< T, float >::get_s(), bezier_base< float, float >::get_s(), bezier_base< double, float >::get_s(), bezier_base< float, float >::intersect(), bezier_base< double, float >::intersect(), bezier_base< T, float >::operator()(), bezier_base< float, float >::set_r(), bezier_base< double, float >::set_r(), bezier_base< T, float >::set_rs(), bezier_base< float, float >::set_rs(), bezier_base< double, float >::set_rs(), bezier_base< T, float >::set_s(), bezier_base< float, float >::set_s(), and bezier_base< double, float >::set_s().
|
protected |
Definition at line 82 of file _bezier.h.
Referenced by bezier< T, float >::evaluate(), bezier_base< T, float >::operator()(), and bezier< T, float >::subdivide().