VTK  9.1.0
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=========================================================================*/
94#ifndef vtkKochanekSpline_h
95#define vtkKochanekSpline_h
96
97#include "vtkCommonComputationalGeometryModule.h" // For export macro
98#include "vtkSpline.h"
99
100class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkKochanekSpline : public vtkSpline
101{
102public:
104 void PrintSelf(ostream& os, vtkIndent indent) override;
105
111
115 void Compute() override;
116
120 double Evaluate(double t) override;
121
123
126 vtkSetMacro(DefaultBias, double);
127 vtkGetMacro(DefaultBias, double);
129
131
134 vtkSetMacro(DefaultTension, double);
135 vtkGetMacro(DefaultTension, double);
137
139
142 vtkSetMacro(DefaultContinuity, double);
143 vtkGetMacro(DefaultContinuity, double);
145
149 void DeepCopy(vtkSpline* s) override;
150
151protected:
153 ~vtkKochanekSpline() override = default;
154
155 void Fit1D(int size, double* x, double* y, double tension, double bias, double continuity,
156 double coefficients[][4], int leftConstraint, double leftValue, int rightConstraint,
157 double rightValue);
158
162
163private:
164 vtkKochanekSpline(const vtkKochanekSpline&) = delete;
165 void operator=(const vtkKochanekSpline&) = delete;
166};
167
168#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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:82