VTK  9.2.6
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 =========================================================================*/
57 #ifndef vtkKochanekSpline_h
58 #define vtkKochanekSpline_h
59 
60 #include "vtkCommonComputationalGeometryModule.h" // For export macro
61 #include "vtkSpline.h"
62 
63 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
64 {
65 public:
66  vtkTypeMacro(vtkKochanekSpline, vtkSpline);
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
74 
78  void Compute() override;
79 
83  double Evaluate(double t) override;
84 
86 
89  vtkSetMacro(DefaultBias, double);
90  vtkGetMacro(DefaultBias, double);
92 
94 
97  vtkSetMacro(DefaultTension, double);
98  vtkGetMacro(DefaultTension, double);
100 
102 
105  vtkSetMacro(DefaultContinuity, double);
106  vtkGetMacro(DefaultContinuity, double);
108 
112  void DeepCopy(vtkSpline* s) override;
113 
114 protected:
116  ~vtkKochanekSpline() override = default;
117 
118  void Fit1D(int size, double* x, double* y, double tension, double bias, double continuity,
119  double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint,
120  double rightValue);
121 
122  double DefaultBias;
125 
126 private:
127  vtkKochanekSpline(const vtkKochanekSpline&) = delete;
128  void operator=(const vtkKochanekSpline&) = delete;
129 };
130 
131 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
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:63
@ size
Definition: vtkX3D.h:259