Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkTupleInterpolator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTupleInterpolator.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even 
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00012      PURPOSE.  See the above copyright notice for more information.
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 //BTX
00101 
00102   enum {INTERPOLATION_TYPE_LINEAR=0,
00103         INTERPOLATION_TYPE_SPLINE
00104   };
00106 //ETX
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   // The number of components being interpolated
00141   int NumberOfComponents;
00142 
00143   // Specify the type of interpolation to use
00144   int InterpolationType;
00145 
00146   // This is the default 1D spline to use
00147   vtkSpline *InterpolatingSpline;
00148 
00149   // Internal variables for interpolation functions
00150   void InitializeInterpolation();
00151   vtkPiecewiseFunction    **Linear;
00152   vtkSpline               **Spline;
00153   
00154 
00155 private:
00156   vtkTupleInterpolator(const vtkTupleInterpolator&);  // Not implemented.
00157   void operator=(const vtkTupleInterpolator&);  // Not implemented.
00158 
00159 };
00160 
00161 #endif

Generated on Mon Jan 21 23:07:36 2008 for VTK by  doxygen 1.4.3-20050530