VTK  9.1.0
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=========================================================================*/
67#ifndef vtkCardinalSpline_h
68#define vtkCardinalSpline_h
69
70#include "vtkCommonComputationalGeometryModule.h" // For export macro
71#include "vtkSpline.h"
72
73class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkCardinalSpline : public vtkSpline
74{
75public:
77
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
84 void Compute() override;
85
89 double Evaluate(double t) override;
90
94 void DeepCopy(vtkSpline* s) override;
95
96protected:
98 ~vtkCardinalSpline() override = default;
99
100 void Fit1D(int size, double* x, double* y, double* w, double coefficients[][4],
101 int leftConstraint, double leftValue, int rightConstraint, double rightValue);
102
103 void FitClosed1D(int size, double* x, double* y, double* w, double coefficients[][4]);
104
105private:
106 vtkCardinalSpline(const vtkCardinalSpline&) = delete;
107 void operator=(const vtkCardinalSpline&) = delete;
108};
109
110#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)
static vtkCardinalSpline * New()
~vtkCardinalSpline() override=default
void Compute() override
Compute Cardinal Splines for each dependent variable.
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:113
spline abstract class for interpolating splines
Definition: vtkSpline.h:82