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 =========================================================================*/
48 #ifndef vtkKochanekSpline_h
49 #define vtkKochanekSpline_h
50 
51 #include "vtkCommonComputationalGeometryModule.h" // For export macro
52 #include "vtkSpline.h"
53 
54 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
55 {
56 public:
57  vtkTypeMacro(vtkKochanekSpline, vtkSpline);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
64  static vtkKochanekSpline* New();
65 
69  void Compute() override;
70 
74  double Evaluate(double t) override;
75 
77 
80  vtkSetMacro(DefaultBias, double);
81  vtkGetMacro(DefaultBias, double);
83 
85 
88  vtkSetMacro(DefaultTension, double);
89  vtkGetMacro(DefaultTension, double);
91 
93 
96  vtkSetMacro(DefaultContinuity, double);
97  vtkGetMacro(DefaultContinuity, double);
99 
103  void DeepCopy(vtkSpline* s) override;
104 
105 protected:
107  ~vtkKochanekSpline() override = default;
108 
109  void Fit1D(int size, double* x, double* y, double tension, double bias, double continuity,
110  double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint,
111  double rightValue);
112 
113  double DefaultBias;
116 
117 private:
118  vtkKochanekSpline(const vtkKochanekSpline&) = delete;
119  void operator=(const vtkKochanekSpline&) = delete;
120 };
121 
122 #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:39
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...