VTK  9.0.1
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 =========================================================================*/
28 #ifndef vtkCardinalSpline_h
29 #define vtkCardinalSpline_h
30 
31 #include "vtkCommonComputationalGeometryModule.h" // For export macro
32 #include "vtkSpline.h"
33 
34 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkCardinalSpline : public vtkSpline
35 {
36 public:
37  static vtkCardinalSpline* New();
38 
39  vtkTypeMacro(vtkCardinalSpline, vtkSpline);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
45  void Compute() override;
46 
50  double Evaluate(double t) override;
51 
55  void DeepCopy(vtkSpline* s) override;
56 
57 protected:
59  ~vtkCardinalSpline() override {}
60 
61  void Fit1D(int n, double* x, double* y, double* w, double coefficients[][4], int leftConstraint,
62  double leftValue, int rightConstraint, double rightValue);
63 
64  void FitClosed1D(int n, double* x, double* y, double* w, double coefficients[][4]);
65 
66 private:
67  vtkCardinalSpline(const vtkCardinalSpline&) = delete;
68  void operator=(const vtkCardinalSpline&) = delete;
69 };
70 
71 #endif
~vtkCardinalSpline() override
virtual double Evaluate(double t)=0
Interpolate the value of the spline at parametric location of t.
a simple class to control print indentation
Definition: vtkIndent.h:33
spline abstract class for interpolating splines
Definition: vtkSpline.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void DeepCopy(vtkSpline *s)
Deep copy of spline data.
virtual void Compute()=0
Compute the coefficients for the spline.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
computes an interpolating spline using a a Cardinal basis.