Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

bspline.h

Go to the documentation of this file.
00001 // Spline Class    by Alan Baylis 2001
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;                   // the degree of the polynomial plus 1
00020     int NumControl;               // number of control points minus 1
00021     int NumPoints;                // number of points to output      *not used in bsplinepoint()
00022     VECTOR* Control;              // control point array
00023     VECTOR* Output;               // output array                    *not used in bsplinepoint()
00024     float StartTime;            // start of spline movement        *used in bsplinepoint()
00025     float EndTime;              // end of spline movement          *used in bsplinepoint()
00026     float CopyOfStartTime;      // work variable
00027     float CopyOfEndTime;        // work variable
00028     bool Active;                  // active flag
00029     bool Repeat;                  // flag for looped output          *used in bsplinepoint()
00030     float Red;                  // color
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); // calculate the blending value
00038 void compute_intervals(int *u, int n, int t); // figure out the knots
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 

Generated on Fri Dec 23 05:19:53 2005 for Particles by doxygen1.2.15