00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00043 #ifndef __vtkTupleInterpolator_h
00044 #define __vtkTupleInterpolator_h
00045
00046 #include "vtkObject.h"
00047
00048 class vtkSpline;
00049 class vtkPiecewiseFunction;
00050
00051
00052 class VTK_RENDERING_EXPORT vtkTupleInterpolator : public vtkObject
00053 {
00054 public:
00055 vtkTypeRevisionMacro(vtkTupleInterpolator, vtkObject);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00057
00059 static vtkTupleInterpolator* New();
00060
00062
00064 void SetNumberOfComponents(int numComp);
00065 vtkGetMacro(NumberOfComponents,int);
00067
00069 int GetNumberOfTuples();
00070
00072
00076 double GetMinimumT();
00077 double GetMaximumT();
00079
00081 void Initialize();
00082
00087 void AddTuple(double t, double tuple[]);
00088
00091 void RemoveTuple(double t);
00092
00097 void InterpolateTuple(double t, double tuple[]);
00098
00099
00101
00102 enum {INTERPOLATION_TYPE_LINEAR=0,
00103 INTERPOLATION_TYPE_SPLINE
00104 };
00106
00107
00109
00117 void SetInterpolationType(int type);
00118 vtkGetMacro(InterpolationType,int);
00119 void SetInterpolationTypeToLinear()
00120 {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
00121 void SetInterpolationTypeToSpline()
00122 {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
00124
00126
00132 void SetInterpolatingSpline(vtkSpline*);
00133 vtkGetObjectMacro(InterpolatingSpline,vtkSpline);
00135
00136 protected:
00137 vtkTupleInterpolator();
00138 virtual ~vtkTupleInterpolator();
00139
00140
00141 int NumberOfComponents;
00142
00143
00144 int InterpolationType;
00145
00146
00147 vtkSpline *InterpolatingSpline;
00148
00149
00150 void InitializeInterpolation();
00151 vtkPiecewiseFunction **Linear;
00152 vtkSpline **Spline;
00153
00154
00155 private:
00156 vtkTupleInterpolator(const vtkTupleInterpolator&);
00157 void operator=(const vtkTupleInterpolator&);
00158
00159 };
00160
00161 #endif