VTK  9.3.0
vtkParametricSpline.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
38#ifndef vtkParametricSpline_h
39#define vtkParametricSpline_h
40
41#include "vtkCommonComputationalGeometryModule.h" // For export macro
43
44VTK_ABI_NAMESPACE_BEGIN
45class vtkSpline;
46class vtkPoints;
47
48class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
61
65 int GetDimension() override { return 1; }
66
71 void Evaluate(double u[3], double Pt[3], double Du[9]) override;
72
77 double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
78
80
88 vtkGetObjectMacro(XSpline, vtkSpline);
89 vtkGetObjectMacro(YSpline, vtkSpline);
90 vtkGetObjectMacro(ZSpline, vtkSpline);
92
94
101 vtkGetObjectMacro(Points, vtkPoints);
103
105
110 void SetPoint(vtkIdType index, double x, double y, double z);
112
114
119 vtkSetMacro(Closed, vtkTypeBool);
120 vtkGetMacro(Closed, vtkTypeBool);
121 vtkBooleanMacro(Closed, vtkTypeBool);
123
125
129 vtkSetMacro(ParameterizeByLength, vtkTypeBool);
130 vtkGetMacro(ParameterizeByLength, vtkTypeBool);
131 vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
133
135
151 vtkSetClampMacro(LeftConstraint, int, 0, 3);
152 vtkGetMacro(LeftConstraint, int);
153 vtkSetClampMacro(RightConstraint, int, 0, 3);
154 vtkGetMacro(RightConstraint, int);
156
158
162 vtkSetMacro(LeftValue, double);
163 vtkGetMacro(LeftValue, double);
164 vtkSetMacro(RightValue, double);
165 vtkGetMacro(RightValue, double);
167
168protected:
171
172 // Points definition
174
175 // The interpolating splines for each of the x-y-z coordinates
179
180 // Supplemental variables
184 double LeftValue;
187
188 // Initializing the spline
191
192 // Internal variable for managing parametric coordinates
193 double Length;
195
196private:
198 void operator=(const vtkParametricSpline&) = delete;
199};
200
201VTK_ABI_NAMESPACE_END
202#endif
a simple class to control print indentation
Definition vtkIndent.h:38
abstract interface for parametric functions
parametric function for 1D interpolating splines
~vtkParametricSpline() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfPoints(vtkIdType numPts)
Another API to set the points.
void SetPoint(vtkIdType index, double x, double y, double z)
Another API to set the points.
double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override
Evaluate a scalar value at parametric coordinate u[0] and Pt[3].
void SetXSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
int GetDimension() override
Return the parametric dimension of the class.
void Evaluate(double u[3], double Pt[3], double Du[9]) override
Evaluate the spline at parametric coordinate u[0] returning the point coordinate Pt[3].
void SetPoints(vtkPoints *)
Specify the list of points defining the spline.
void SetYSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
static vtkParametricSpline * New()
Construct the spline with the following parameters: MinimumU = 0, MaximumU = 1, JoinU = 0 (unless the...
void SetZSpline(vtkSpline *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
represent and manipulate 3D points
Definition vtkPoints.h:38
spline abstract class for interpolating splines
Definition vtkSpline.h:52
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270