VTK  9.2.6
vtkCardinalSpline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCardinalSpline.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 =========================================================================*/
70 #ifndef vtkCardinalSpline_h
71 #define vtkCardinalSpline_h
72 
73 #include "vtkCommonComputationalGeometryModule.h" // For export macro
74 #include "vtkSpline.h"
75 
76 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkCardinalSpline : public vtkSpline
77 {
78 public:
80 
81  vtkTypeMacro(vtkCardinalSpline, vtkSpline);
82  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
87  void Compute() override;
88 
92  double Evaluate(double t) override;
93 
97  void DeepCopy(vtkSpline* s) override;
98 
99 protected:
101  ~vtkCardinalSpline() override = default;
102 
103  void Fit1D(int size, double* x, double* y, double* w, double coefficients[][4],
104  int leftConstraint, double leftValue, int rightConstraint, double rightValue);
105 
106  void FitClosed1D(int size, double* x, double* y, double* w, double coefficients[][4]);
107 
108 private:
109  vtkCardinalSpline(const vtkCardinalSpline&) = delete;
110  void operator=(const vtkCardinalSpline&) = delete;
111 };
112 
113 #endif
computes an interpolating spline using a a Cardinal basis.
void Fit1D(int size, double *x, double *y, double *w, double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint, double rightValue)
~vtkCardinalSpline() override=default
void Compute() override
Compute Cardinal Splines for each dependent variable.
static vtkCardinalSpline * New()
double Evaluate(double t) override
Evaluate a 1D cardinal spline.
void DeepCopy(vtkSpline *s) override
Deep copy of cardinal spline data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FitClosed1D(int size, double *x, double *y, double *w, double coefficients[][4])
a simple class to control print indentation
Definition: vtkIndent.h:119
spline abstract class for interpolating splines
Definition: vtkSpline.h:82
@ size
Definition: vtkX3D.h:259