Filtering/vtkSpline.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkSpline_h
00040 #define __vtkSpline_h
00041
00042 #include "vtkObject.h"
00043
00044 class vtkPiecewiseFunction;
00045
00046 class VTK_FILTERING_EXPORT vtkSpline : public vtkObject
00047 {
00048 public:
00049 vtkTypeRevisionMacro(vtkSpline,vtkObject);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00055 vtkSetMacro(ClampValue,int);
00056 vtkGetMacro(ClampValue,int);
00057 vtkBooleanMacro(ClampValue,int);
00059
00061 virtual void Compute () = 0;
00062
00064 virtual double Evaluate (double t) = 0;
00065
00067 void AddPoint (double t, double x);
00068
00070 void RemovePoint (double t);
00071
00073 void RemoveAllPoints ();
00074
00076
00079 vtkSetMacro(Closed,int);
00080 vtkGetMacro(Closed,int);
00081 vtkBooleanMacro(Closed,int);
00083
00085
00093 vtkSetClampMacro(LeftConstraint,int,0,3);
00094 vtkGetMacro(LeftConstraint,int);
00095 vtkSetClampMacro(RightConstraint,int,0,3);
00096 vtkGetMacro(RightConstraint,int);
00098
00100
00102 vtkSetMacro(LeftValue,double);
00103 vtkGetMacro(LeftValue,double);
00104 vtkSetMacro(RightValue,double);
00105 vtkGetMacro(RightValue,double);
00107
00109 unsigned long GetMTime();
00110
00112 virtual void DeepCopy(vtkSpline *s);
00113
00114 protected:
00115 vtkSpline();
00116 ~vtkSpline ();
00117
00118 unsigned long ComputeTime;
00119 int ClampValue;
00120 double *Intervals;
00121 double *Coefficients;
00122 int LeftConstraint;
00123 double LeftValue;
00124 int RightConstraint;
00125 double RightValue;
00126 vtkPiecewiseFunction *PiecewiseFunction;
00127 int Closed;
00128
00129
00130 double ComputeLeftDerivative();
00131 double ComputeRightDerivative();
00132
00133 private:
00134 vtkSpline(const vtkSpline&);
00135 void operator=(const vtkSpline&);
00136 };
00137
00138 #endif
00139