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 =========================================================================*/
40 #ifndef vtkCardinalSpline_h
41 #define vtkCardinalSpline_h
42 
43 #include "vtkCommonComputationalGeometryModule.h" // For export macro
44 #include "vtkSpline.h"
45 
46 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkCardinalSpline : public vtkSpline
47 {
48 public:
50 
51  vtkTypeMacro(vtkCardinalSpline, vtkSpline);
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  void Compute() override;
58 
62  double Evaluate(double t) override;
63 
67  void DeepCopy(vtkSpline* s) override;
68 
69 protected:
71  ~vtkCardinalSpline() override = default;
72 
73  void Fit1D(int size, double* x, double* y, double* w, double coefficients[][4],
74  int leftConstraint, double leftValue, int rightConstraint, double rightValue);
75 
76  void FitClosed1D(int size, double* x, double* y, double* w, double coefficients[][4]);
77 
78 private:
79  vtkCardinalSpline(const vtkCardinalSpline&) = delete;
80  void operator=(const vtkCardinalSpline&) = delete;
81 };
82 
83 #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:49
spline abstract class for interpolating splines
Definition: vtkSpline.h:63
@ size
Definition: vtkX3D.h:259