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
29#ifndef vtkParametricSpline_h
30#define vtkParametricSpline_h
31
32#include "vtkCommonComputationalGeometryModule.h" // For export macro
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkSpline;
37class vtkPoints;
38
39class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
52
56 int GetDimension() override { return 1; }
57
62 void Evaluate(double u[3], double Pt[3], double Du[9]) override;
63
68 double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
69
71
79 vtkGetObjectMacro(XSpline, vtkSpline);
80 vtkGetObjectMacro(YSpline, vtkSpline);
81 vtkGetObjectMacro(ZSpline, vtkSpline);
83
85
92 vtkGetObjectMacro(Points, vtkPoints);
94
96
101 void SetPoint(vtkIdType index, double x, double y, double z);
103
105
110 vtkSetMacro(Closed, vtkTypeBool);
111 vtkGetMacro(Closed, vtkTypeBool);
112 vtkBooleanMacro(Closed, vtkTypeBool);
114
116
120 vtkSetMacro(ParameterizeByLength, vtkTypeBool);
121 vtkGetMacro(ParameterizeByLength, vtkTypeBool);
122 vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
124
126
142 vtkSetClampMacro(LeftConstraint, int, 0, 3);
143 vtkGetMacro(LeftConstraint, int);
144 vtkSetClampMacro(RightConstraint, int, 0, 3);
145 vtkGetMacro(RightConstraint, int);
147
149
153 vtkSetMacro(LeftValue, double);
154 vtkGetMacro(LeftValue, double);
155 vtkSetMacro(RightValue, double);
156 vtkGetMacro(RightValue, double);
158
159protected:
162
163 // Points definition
165
166 // The interpolating splines for each of the x-y-z coordinates
170
171 // Supplemental variables
175 double LeftValue;
178
179 // Initializing the spline
182
183 // Internal variable for managing parametric coordinates
184 double Length;
186
187private:
189 void operator=(const vtkParametricSpline&) = delete;
190};
191
192VTK_ABI_NAMESPACE_END
193#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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:29
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