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