#include <CubicBezierSpline.h>
Collaboration diagram for mathglpp::CubicBezierSpline4< T >:
Definition at line 33 of file CubicBezierSpline.h.
Public Types | |
enum | { D = 4 } |
enum | { D = 4 } |
typedef T | value_type |
typedef GLVector4< value_type > | vector_type |
typedef CubicBezierCurve4< value_type > | curve_type |
typedef T | value_type |
typedef GLVector4< value_type > | vector_type |
typedef CubicBezierCurve4< value_type > | curve_type |
Public Member Functions | |
CubicBezierSpline4 (GLint ncurves, const value_type *cpoints) | |
Create and premultiply a basis matrix for later interpolation, cpoints must not be NULL!!!! | |
CubicBezierSpline4 (GLint ncurves, const vector_type *cpoints) | |
~CubicBezierSpline4 () | |
void | interpolate (GLclampf interp, value_type *vertex) const |
GLVector interface for vertex generation, interp : [0,1]. | |
CubicBezierSpline4 (GLint ncurves, const value_type *cpoints) | |
Create and premultiply a basis matrix for later interpolation, cpoints must not be NULL!!!! | |
CubicBezierSpline4 (GLint ncurves, const vector_type *cpoints) | |
~CubicBezierSpline4 () | |
vector_type | interpolate (GLclampf interp) const |
GLVector interface for vertex generation, interp : [0,1]. | |
void | interpolate (GLclampf interp, value_type *vertex) const |
GLVector interface for vertex generation, interp : [0,1]. |
anonymous enum |
anonymous enum |
mathglpp::CubicBezierSpline4< T >::CubicBezierSpline4 | ( | GLint | ncurves, | |
const value_type * | cpoints | |||
) | [inline] |
Create and premultiply a basis matrix for later interpolation, cpoints must not be NULL!!!!
Assume end points line up
Copy the points into a bezier curve interpolator
Definition at line 43 of file CubicBezierSpline.h.
00044 :number_of_curves(ncurves) 00045 { 00046 const value_type* c0 = cpoints; 00048 for(GLint i = 0; i < number_of_curves; ++i, c0+=12) 00050 curves.push_back(curve_type(c0)); 00051 }
mathglpp::CubicBezierSpline4< T >::CubicBezierSpline4 | ( | GLint | ncurves, | |
const vector_type * | cpoints | |||
) | [inline] |
Assume end points line up
Copy the points into a bezier curve interpolator
Definition at line 53 of file CubicBezierSpline.h.
00054 :number_of_curves(ncurves) 00055 { 00056 const vector_type* c0 = cpoints; 00058 for(GLint i = 0; i < number_of_curves; ++i, c0+=3) 00060 curves.push_back(curve_type(*c0, *(c0+1), *(c0+2), *(c0+3))); 00061 }
mathglpp::CubicBezierSpline4< T >::CubicBezierSpline4 | ( | GLint | ncurves, | |
const value_type * | cpoints | |||
) | [inline] |
Create and premultiply a basis matrix for later interpolation, cpoints must not be NULL!!!!
Assume end points line up
Copy the points into a bezier curve interpolator
Point to the start of the next curve
Definition at line 43 of file GLCubicBezierSpline.h.
00044 :number_of_curves(ncurves) 00045 { 00046 value_type* c0 = cpoints; 00047 00049 for(GLint i = 0; i < number_of_curves; ++i) 00050 { 00052 curves.push_back(curve_type(c0)); 00054 c0+=12; 00055 } 00056 }
mathglpp::CubicBezierSpline4< T >::CubicBezierSpline4 | ( | GLint | ncurves, | |
const vector_type * | cpoints | |||
) | [inline] |
Assume end points line up
Copy the points into a bezier curve interpolator
Point to the start of the next curve
Definition at line 58 of file GLCubicBezierSpline.h.
00059 :number_of_curves(ncurves) 00060 { 00061 const vector_type* c0 = cpoints; 00062 00064 for(GLint i = 0; i < number_of_curves; ++i) 00065 { 00067 curves.push_back(curve_type(*c0, *(c0+1), *(c0+2), *(c0+3))); 00069 c0+=3; 00070 } 00071 }
void mathglpp::CubicBezierSpline4< T >::interpolate | ( | GLclampf | interp, | |
value_type * | vertex | |||
) | const [inline] |
GLVector interface for vertex generation, interp : [0,1].
Definition at line 66 of file CubicBezierSpline.h.
00067 { 00068 GLclampf c; GLclampf u = modff(interp*number_of_curves, &c); 00069 if(c == number_of_curves){ c = number_of_curves-1; u = 1.0; } 00070 return curves[int(c)].interpolate(u,vertex); 00071 }
vector_type mathglpp::CubicBezierSpline4< T >::interpolate | ( | GLclampf | interp | ) | const [inline] |
GLVector interface for vertex generation, interp : [0,1].
Definition at line 76 of file GLCubicBezierSpline.h.
00077 { 00078 GLclampf c; GLclampf u = modff(interp*number_of_curves, &c); 00079 if(c == number_of_curves){ c = number_of_curves-1; u = 1.0; } 00080 return curves[int(c)].interpolate(u); 00081 }
void mathglpp::CubicBezierSpline4< T >::interpolate | ( | GLclampf | interp, | |
value_type * | vertex | |||
) | const [inline] |
GLVector interface for vertex generation, interp : [0,1].
Definition at line 84 of file GLCubicBezierSpline.h.
00085 { 00086 GLclampf c; GLclampf u = modff(interp*number_of_curves, &c); 00087 if(c == number_of_curves){ c = number_of_curves-1; u = 1.0; } 00088 return curves[int(c)].interpolate(u,vertex); 00089 }