VTK
vtkTupleInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTupleInterpolator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef vtkTupleInterpolator_h
44 #define vtkTupleInterpolator_h
45 
46 #include "vtkRenderingCoreModule.h" // For export macro
47 #include "vtkObject.h"
48 
49 class vtkSpline;
51 
52 
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60  static vtkTupleInterpolator* New();
61 
63 
65  void SetNumberOfComponents(int numComp);
66  vtkGetMacro(NumberOfComponents,int);
68 
70  int GetNumberOfTuples();
71 
73 
77  double GetMinimumT();
78  double GetMaximumT();
80 
82  void Initialize();
83 
88  void AddTuple(double t, double tuple[]);
89 
92  void RemoveTuple(double t);
93 
98  void InterpolateTuple(double t, double tuple[]);
99 
100 //BTX
102 
103  enum {INTERPOLATION_TYPE_LINEAR=0,
104  INTERPOLATION_TYPE_SPLINE
105  };
106 //ETX
108 
110 
118  void SetInterpolationType(int type);
119  vtkGetMacro(InterpolationType,int);
121  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
123  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
125 
127 
133  void SetInterpolatingSpline(vtkSpline*);
134  vtkGetObjectMacro(InterpolatingSpline,vtkSpline);
136 
137 protected:
139  virtual ~vtkTupleInterpolator();
140 
141  // The number of components being interpolated
143 
144  // Specify the type of interpolation to use
146 
147  // This is the default 1D spline to use
149 
150  // Internal variables for interpolation functions
151  void InitializeInterpolation();
154 
155 
156 private:
157  vtkTupleInterpolator(const vtkTupleInterpolator&); // Not implemented.
158  void operator=(const vtkTupleInterpolator&); // Not implemented.
159 
160 };
161 
162 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
Defines a 1D piecewise function.
interpolate a tuple of arbitray size
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
spline abstract class for interpolating splines
Definition: vtkSpline.h:61
vtkPiecewiseFunction ** Linear
#define VTKRENDERINGCORE_EXPORT
static vtkObject * New()