dox/Filtering/vtkSpline.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00043 #ifndef __vtkSpline_h
00044 #define __vtkSpline_h
00045
00046 #include "vtkObject.h"
00047
00048 class vtkPiecewiseFunction;
00049
00050 class VTK_FILTERING_EXPORT vtkSpline : public vtkObject
00051 {
00052 public:
00053 vtkTypeRevisionMacro(vtkSpline,vtkObject);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00056 #ifndef VTK_REMOVE_LEGACY_CODE
00057
00058 virtual vtkSpline* MakeObject();
00059 #endif
00060
00062
00064 vtkSetMacro(ClampValue,int);
00065 vtkGetMacro(ClampValue,int);
00066 vtkBooleanMacro(ClampValue,int);
00068
00070 virtual void Compute () = 0;
00071
00073 virtual float Evaluate (float t) = 0;
00074
00076 void AddPoint (float t, float x);
00077
00079 void RemovePoint (float t);
00080
00082 void RemoveAllPoints ();
00083
00085
00088 vtkSetMacro(Closed,int);
00089 vtkGetMacro(Closed,int);
00090 vtkBooleanMacro(Closed,int);
00092
00094
00102 vtkSetClampMacro(LeftConstraint,int,0,3);
00103 vtkGetMacro(LeftConstraint,int);
00104 vtkSetClampMacro(RightConstraint,int,0,3);
00105 vtkGetMacro(RightConstraint,int);
00107
00109
00111 vtkSetMacro(LeftValue,float);
00112 vtkGetMacro(LeftValue,float);
00113 vtkSetMacro(RightValue,float);
00114 vtkGetMacro(RightValue,float);
00116
00118 unsigned long GetMTime();
00119
00121 virtual void DeepCopy(vtkSpline *s);
00122
00123 protected:
00124 vtkSpline();
00125 ~vtkSpline ();
00126
00127 unsigned long ComputeTime;
00128 int ClampValue;
00129 float *Intervals;
00130 float *Coefficients;
00131 int LeftConstraint;
00132 float LeftValue;
00133 int RightConstraint;
00134 float RightValue;
00135 vtkPiecewiseFunction *PiecewiseFunction;
00136 int Closed;
00137
00138
00139 float ComputeLeftDerivative();
00140 float ComputeRightDerivative();
00141
00142 private:
00143 vtkSpline(const vtkSpline&);
00144 void operator=(const vtkSpline&);
00145 };
00146
00147 #endif
00148