VTK  9.3.20240713
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
108#ifndef vtkParametricSpline_h
109#define vtkParametricSpline_h
110
111#include "vtkCommonComputationalGeometryModule.h" // For export macro
113
114VTK_ABI_NAMESPACE_BEGIN
115class vtkSpline;
116class vtkPoints;
117
118class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
119{
120public:
122 void PrintSelf(ostream& os, vtkIndent indent) override;
123
131
135 int GetDimension() override { return 1; }
136
141 void Evaluate(double u[3], double Pt[3], double Du[9]) override;
142
147 double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
148
150
158 vtkGetObjectMacro(XSpline, vtkSpline);
159 vtkGetObjectMacro(YSpline, vtkSpline);
160 vtkGetObjectMacro(ZSpline, vtkSpline);
162
164
171 vtkGetObjectMacro(Points, vtkPoints);
173
175
180 void SetPoint(vtkIdType index, double x, double y, double z);
182
184
189 vtkSetMacro(Closed, vtkTypeBool);
190 vtkGetMacro(Closed, vtkTypeBool);
191 vtkBooleanMacro(Closed, vtkTypeBool);
193
195
199 vtkSetMacro(ParameterizeByLength, vtkTypeBool);
200 vtkGetMacro(ParameterizeByLength, vtkTypeBool);
201 vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
203
205
221 vtkSetClampMacro(LeftConstraint, int, 0, 3);
222 vtkGetMacro(LeftConstraint, int);
223 vtkSetClampMacro(RightConstraint, int, 0, 3);
224 vtkGetMacro(RightConstraint, int);
226
228
232 vtkSetMacro(LeftValue, double);
233 vtkGetMacro(LeftValue, double);
234 vtkSetMacro(RightValue, double);
235 vtkGetMacro(RightValue, double);
237
238protected:
241
242 // Points definition
244
245 // The interpolating splines for each of the x-y-z coordinates
249
250 // Supplemental variables
254 double LeftValue;
257
258 // Initializing the spline
261
262 // Internal variable for managing parametric coordinates
263 double Length;
265
266private:
268 void operator=(const vtkParametricSpline&) = delete;
269};
270
271VTK_ABI_NAMESPACE_END
272#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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:139
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