VTK  9.7.20260921
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
107
108#ifndef vtkParametricSpline_h
109#define vtkParametricSpline_h
110
111#include "vtkCommonComputationalGeometryModule.h" // For export macro
113#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
114
115VTK_ABI_NAMESPACE_BEGIN
116class vtkSpline;
117class vtkPoints;
118
119class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT VTK_MARSHALAUTO vtkParametricSpline
120 : public vtkParametricFunction
121{
122public:
124 void PrintSelf(ostream& os, vtkIndent indent) override;
125
133
137 int GetDimension() override { return 1; }
138
143 void Evaluate(double u[3], double Pt[3], double Du[9]) override;
144
149 double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
150
152
160 vtkGetObjectMacro(XSpline, vtkSpline);
161 vtkGetObjectMacro(YSpline, vtkSpline);
162 vtkGetObjectMacro(ZSpline, vtkSpline);
164
166
173 vtkGetObjectMacro(Points, vtkPoints);
175
177
182 void SetPoint(vtkIdType index, double x, double y, double z);
184
186
191 vtkSetMacro(Closed, vtkTypeBool);
192 vtkGetMacro(Closed, vtkTypeBool);
193 vtkBooleanMacro(Closed, vtkTypeBool);
195
197
205
207
223 vtkSetClampMacro(LeftConstraint, int, 0, 3);
224 vtkGetMacro(LeftConstraint, int);
225 vtkSetClampMacro(RightConstraint, int, 0, 3);
226 vtkGetMacro(RightConstraint, int);
228
230
234 vtkSetMacro(LeftValue, double);
235 vtkGetMacro(LeftValue, double);
236 vtkSetMacro(RightValue, double);
237 vtkGetMacro(RightValue, double);
239
240protected:
243
244 // Points definition
246
247 // The interpolating splines for each of the x-y-z coordinates
251
252 // Supplemental variables
256 double LeftValue;
259
260 // Initializing the spline
263
264 // Internal variable for managing parametric coordinates
265 double Length;
267
268private:
270 void operator=(const vtkParametricSpline&) = delete;
271};
272
273VTK_ABI_NAMESPACE_END
274#endif
a simple class to control print indentation
Definition vtkIndent.h:108
~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:140
spline abstract class for interpolating splines
Definition vtkSpline.h:53
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:363
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO