VTK  9.3.1
vtkKochanekSpline.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
36 #ifndef vtkKochanekSpline_h
37 #define vtkKochanekSpline_h
38 
39 #include "vtkCommonComputationalGeometryModule.h" // For export macro
40 #include "vtkSpline.h"
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
44 {
45 public:
46  vtkTypeMacro(vtkKochanekSpline, vtkSpline);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
53  static vtkKochanekSpline* New();
54 
58  void Compute() override;
59 
63  double Evaluate(double t) override;
64 
66 
69  vtkSetMacro(DefaultBias, double);
70  vtkGetMacro(DefaultBias, double);
72 
74 
77  vtkSetMacro(DefaultTension, double);
78  vtkGetMacro(DefaultTension, double);
80 
82 
85  vtkSetMacro(DefaultContinuity, double);
86  vtkGetMacro(DefaultContinuity, double);
88 
92  void DeepCopy(vtkSpline* s) override;
93 
94 protected:
96  ~vtkKochanekSpline() override = default;
97 
98  void Fit1D(int size, double* x, double* y, double tension, double bias, double continuity,
99  double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint,
100  double rightValue);
101 
102  double DefaultBias;
105 
106 private:
107  vtkKochanekSpline(const vtkKochanekSpline&) = delete;
108  void operator=(const vtkKochanekSpline&) = delete;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 #endif
virtual double Evaluate(double t)=0
Interpolate the value of the spline at parametric location of t.
computes an interpolating spline using a Kochanek basis.
a simple class to control print indentation
Definition: vtkIndent.h:28
spline abstract class for interpolating splines
Definition: vtkSpline.h:51
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...