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=========================================================================*/
44#ifndef vtkTupleInterpolator_h
45#define vtkTupleInterpolator_h
46
47#include "vtkRenderingCoreModule.h" // For export macro
48#include "vtkObject.h"
49
50class vtkSpline;
52
53
54class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent);
59
64
66
70 void SetNumberOfComponents(int numComp);
71 vtkGetMacro(NumberOfComponents,int);
73
79
81
87 double GetMinimumT();
88 double GetMaximumT();
90
94 void Initialize();
95
102 void AddTuple(double t, double tuple[]);
103
108 void RemoveTuple(double t);
109
116 void InterpolateTuple(double t, double tuple[]);
117
121 enum {INTERPOLATION_TYPE_LINEAR=0,
122 INTERPOLATION_TYPE_SPLINE
123 };
124
126
137 vtkGetMacro(InterpolationType,int);
139 {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
141 {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
143
145
154 vtkGetObjectMacro(InterpolatingSpline,vtkSpline);
156
157protected:
160
161 // The number of components being interpolated
163
164 // Specify the type of interpolation to use
166
167 // This is the default 1D spline to use
169
170 // Internal variables for interpolation functions
174
175
176private:
177 vtkTupleInterpolator(const vtkTupleInterpolator&) VTK_DELETE_FUNCTION;
178 void operator=(const vtkTupleInterpolator&) VTK_DELETE_FUNCTION;
179
180};
181
182#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
Defines a 1D piecewise function.
spline abstract class for interpolating splines
Definition: vtkSpline.h:63
interpolate a tuple of arbitray size
static vtkTupleInterpolator * New()
Instantiate the class.
void InterpolateTuple(double t, double tuple[])
Interpolate the list of tuples and determine a new tuple (i.e., fill in the tuple provided).
virtual ~vtkTupleInterpolator()
vtkPiecewiseFunction ** Linear
void SetNumberOfComponents(int numComp)
Specify the number of tuple components to interpolate.
void RemoveTuple(double t)
Delete the tuple at a particular parameter t.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void Initialize()
Reset the class so that it contains no (t,tuple) information.
void AddTuple(double t, double tuple[])
Add another tuple to the list of tuples to be interpolated.
double GetMinimumT()
Obtain some information about the interpolation range.
void InitializeInterpolation()
void SetInterpolatingSpline(vtkSpline *)
If the InterpolationType is set to spline, then this method applies.
void SetInterpolationType(int type)
Specify which type of function to use for interpolation.
int GetNumberOfTuples()
Return the number of tuples in the list of tuples to be interpolated.
@ type
Definition: vtkX3D.h:516