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
00055 #ifndef __vtkSpline_h
00056 #define __vtkSpline_h
00057
00058 #include "vtkObject.h"
00059
00060 class vtkPiecewiseFunction;
00061
00062 class VTK_FILTERING_EXPORT vtkSpline : public vtkObject
00063 {
00064 public:
00065 vtkTypeRevisionMacro(vtkSpline,vtkObject);
00066 void PrintSelf(ostream& os, vtkIndent indent);
00067
00068 #ifndef VTK_REMOVE_LEGACY_CODE
00069
00070 virtual vtkSpline* MakeObject();
00071 #endif
00072
00074
00076 vtkSetMacro(ClampValue,int);
00077 vtkGetMacro(ClampValue,int);
00078 vtkBooleanMacro(ClampValue,int);
00080
00082 virtual void Compute () = 0;
00083
00085 virtual float Evaluate (float t) = 0;
00086
00088 void AddPoint (float t, float x);
00089
00091 void RemovePoint (float t);
00092
00094 void RemoveAllPoints ();
00095
00097
00100 vtkSetMacro(Closed,int);
00101 vtkGetMacro(Closed,int);
00102 vtkBooleanMacro(Closed,int);
00104
00106
00114 vtkSetClampMacro(LeftConstraint,int,0,3);
00115 vtkGetMacro(LeftConstraint,int);
00116 vtkSetClampMacro(RightConstraint,int,0,3);
00117 vtkGetMacro(RightConstraint,int);
00119
00121
00123 vtkSetMacro(LeftValue,float);
00124 vtkGetMacro(LeftValue,float);
00125 vtkSetMacro(RightValue,float);
00126 vtkGetMacro(RightValue,float);
00128
00130 unsigned long GetMTime();
00131
00133 virtual void DeepCopy(vtkSpline *s);
00134
00135 protected:
00136 vtkSpline();
00137 ~vtkSpline ();
00138
00139 unsigned long ComputeTime;
00140 int ClampValue;
00141 float *Intervals;
00142 float *Coefficients;
00143 int LeftConstraint;
00144 float LeftValue;
00145 int RightConstraint;
00146 float RightValue;
00147 vtkPiecewiseFunction *PiecewiseFunction;
00148 int Closed;
00149
00150
00151 float ComputeLeftDerivative();
00152 float ComputeRightDerivative();
00153
00154 private:
00155 vtkSpline(const vtkSpline&);
00156 void operator=(const vtkSpline&);
00157 };
00158
00159 #endif
00160