VTK  9.2.20230320
vtkKochanekSpline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkKochanekSpline.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 =========================================================================*/
97 #ifndef vtkKochanekSpline_h
98 #define vtkKochanekSpline_h
99 
100 #include "vtkCommonComputationalGeometryModule.h" // For export macro
101 #include "vtkSpline.h"
102 
103 VTK_ABI_NAMESPACE_BEGIN
104 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
105 {
106 public:
107  vtkTypeMacro(vtkKochanekSpline, vtkSpline);
108  void PrintSelf(ostream& os, vtkIndent indent) override;
109 
115 
119  void Compute() override;
120 
124  double Evaluate(double t) override;
125 
127 
130  vtkSetMacro(DefaultBias, double);
131  vtkGetMacro(DefaultBias, double);
133 
135 
138  vtkSetMacro(DefaultTension, double);
139  vtkGetMacro(DefaultTension, double);
141 
143 
146  vtkSetMacro(DefaultContinuity, double);
147  vtkGetMacro(DefaultContinuity, double);
149 
153  void DeepCopy(vtkSpline* s) override;
154 
155 protected:
157  ~vtkKochanekSpline() override = default;
158 
159  void Fit1D(int size, double* x, double* y, double tension, double bias, double continuity,
160  double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint,
161  double rightValue);
162 
163  double DefaultBias;
166 
167 private:
168  vtkKochanekSpline(const vtkKochanekSpline&) = delete;
169  void operator=(const vtkKochanekSpline&) = delete;
170 };
171 
172 VTK_ABI_NAMESPACE_END
173 #endif
a simple class to control print indentation
Definition: vtkIndent.h:120
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.
static vtkKochanekSpline * New()
Construct a KochanekSpline with the following defaults: DefaultBias = 0, DefaultTension = 0,...
~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.
spline abstract class for interpolating splines
Definition: vtkSpline.h:83
@ size
Definition: vtkX3D.h:265