VTK  9.0.1
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 "vtkObject.h"
48 #include "vtkRenderingCoreModule.h" // For export macro
49 
50 class vtkSpline;
52 
53 class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  static vtkTupleInterpolator* New();
63 
65 
69  void SetNumberOfComponents(int numComp);
70  vtkGetMacro(NumberOfComponents, int);
72 
77  int GetNumberOfTuples();
78 
80 
86  double GetMinimumT();
87  double GetMaximumT();
89 
93  void Initialize();
94 
101  void AddTuple(double t, double tuple[]);
102 
107  void RemoveTuple(double t);
108 
115  void InterpolateTuple(double t, double tuple[]);
116 
120  enum
121  {
122  INTERPOLATION_TYPE_LINEAR = 0,
123  INTERPOLATION_TYPE_SPLINE
124  };
125 
127 
137  void SetInterpolationType(int type);
138  vtkGetMacro(InterpolationType, int);
139  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
140  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
142 
144 
152  void SetInterpolatingSpline(vtkSpline*);
153  vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
155 
156 protected:
158  ~vtkTupleInterpolator() override;
159 
160  // The number of components being interpolated
162 
163  // Specify the type of interpolation to use
165 
166  // This is the default 1D spline to use
168 
169  // Internal variables for interpolation functions
170  void InitializeInterpolation();
173 
174 private:
176  void operator=(const vtkTupleInterpolator&) = delete;
177 };
178 
179 #endif
vtkTupleInterpolator::NumberOfComponents
int NumberOfComponents
Definition: vtkTupleInterpolator.h:161
vtkTupleInterpolator::Linear
vtkPiecewiseFunction ** Linear
Definition: vtkTupleInterpolator.h:171
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTupleInterpolator::SetInterpolationTypeToSpline
void SetInterpolationTypeToSpline()
Definition: vtkTupleInterpolator.h:140
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSpline
spline abstract class for interpolating splines
Definition: vtkSpline.h:62
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:45
vtkTupleInterpolator::Spline
vtkSpline ** Spline
Definition: vtkTupleInterpolator.h:172
vtkTupleInterpolator::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Definition: vtkTupleInterpolator.h:139
vtkTupleInterpolator::InterpolationType
int InterpolationType
Definition: vtkTupleInterpolator.h:164
vtkTupleInterpolator
interpolate a tuple of arbitrary size
Definition: vtkTupleInterpolator.h:53
vtkTupleInterpolator::InterpolatingSpline
vtkSpline * InterpolatingSpline
Definition: vtkTupleInterpolator.h:167