VTK  9.3.0
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
42VTK_ABI_NAMESPACE_BEGIN
43class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
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
94protected:
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
105
106private:
107 vtkKochanekSpline(const vtkKochanekSpline&) = delete;
108 void operator=(const vtkKochanekSpline&) = delete;
109};
110
111VTK_ABI_NAMESPACE_END
112#endif
a simple class to control print indentation
Definition vtkIndent.h:29
computes an interpolating spline using a Kochanek basis.
double Evaluate(double t) override
Evaluate a 1D Kochanek spline.
void Fit1D(int size, double *x, double *y, double tension, double bias, double continuity, double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint, double rightValue)
void Compute() override
Compute Kochanek Spline coefficients.
~vtkKochanekSpline() override=default
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.
static vtkKochanekSpline * New()
Construct a KochanekSpline with the following defaults: DefaultBias = 0, DefaultTension = 0,...
spline abstract class for interpolating splines
Definition vtkSpline.h:52