00001
00002
00003 #ifndef SplineH
00004 #define SplineH
00005
00006 #include "vector.h"
00007
00008 class SPLINE
00009 {
00010 public:
00011 SPLINE(){};
00012 ~SPLINE(){};
00013
00014 int Compare(const SPLINE& Spline);
00015 int GetMyPosition() const {return linkPosition;}
00016 void SetMyPosition(int newPosition) {linkPosition = newPosition;}
00017 int linkPosition;
00018 int Degree;
00019 int NumControl;
00020 int NumPoints;
00021 VECTOR* Control;
00022 VECTOR* Output;
00023 float StartTime;
00024 float EndTime;
00025 float CopyOfStartTime;
00026 float CopyOfEndTime;
00027 bool Active;
00028 bool Repeat;
00029 float Red;
00030 float Green;
00031 float Blue;
00032 };
00033
00034 void bspline(SPLINE* spline);
00035 VECTOR bsplinepoint(SPLINE* spline);
00036 float blend(int k, int t, int *u, float v);
00037 void compute_intervals(int *u, int n, int t);
00038 void compute_point(int *u, int n, int t, float v, VECTOR *control, VECTOR *output);
00039
00040 #endif
00041