vtkSpline.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkSpline_h
00052 #define __vtkSpline_h
00053
00054 #include "vtkObject.h"
00055
00056 class vtkPiecewiseFunction;
00057
00058 class VTK_FILTERING_EXPORT vtkSpline : public vtkObject
00059 {
00060 public:
00061 vtkTypeRevisionMacro(vtkSpline,vtkObject);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00063
00065
00067 vtkSetMacro(ClampValue,int);
00068 vtkGetMacro(ClampValue,int);
00069 vtkBooleanMacro(ClampValue,int);
00071
00073 virtual void Compute () = 0;
00074
00076 virtual double Evaluate (double t) = 0;
00077
00079 void AddPoint (double t, double x);
00080
00082 void RemovePoint (double t);
00083
00085 void RemoveAllPoints ();
00086
00088
00091 vtkSetMacro(Closed,int);
00092 vtkGetMacro(Closed,int);
00093 vtkBooleanMacro(Closed,int);
00095
00097
00105 vtkSetClampMacro(LeftConstraint,int,0,3);
00106 vtkGetMacro(LeftConstraint,int);
00107 vtkSetClampMacro(RightConstraint,int,0,3);
00108 vtkGetMacro(RightConstraint,int);
00110
00112
00114 vtkSetMacro(LeftValue,double);
00115 vtkGetMacro(LeftValue,double);
00116 vtkSetMacro(RightValue,double);
00117 vtkGetMacro(RightValue,double);
00119
00121 unsigned long GetMTime();
00122
00124 virtual void DeepCopy(vtkSpline *s);
00125
00126 protected:
00127 vtkSpline();
00128 ~vtkSpline ();
00129
00130 unsigned long ComputeTime;
00131 int ClampValue;
00132 double *Intervals;
00133 double *Coefficients;
00134 int LeftConstraint;
00135 double LeftValue;
00136 int RightConstraint;
00137 double RightValue;
00138 vtkPiecewiseFunction *PiecewiseFunction;
00139 int Closed;
00140
00141
00142 double ComputeLeftDerivative();
00143 double ComputeRightDerivative();
00144 int FindIndex(int size, double t);
00145
00146 private:
00147 vtkSpline(const vtkSpline&);
00148 void operator=(const vtkSpline&);
00149 };
00150
00151 #endif
00152