VTK  9.0.2
vtkParametricSpline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParametricSpline.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 =========================================================================*/
38 #ifndef vtkParametricSpline_h
39 #define vtkParametricSpline_h
40 
41 class vtkSpline;
42 class vtkPoints;
43 
44 #include "vtkCommonComputationalGeometryModule.h" // For export macro
45 #include "vtkParametricFunction.h"
46 
47 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
60 
64  int GetDimension() override { return 1; }
65 
70  void Evaluate(double u[3], double Pt[3], double Du[9]) override;
71 
76  double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
77 
79 
87  vtkGetObjectMacro(XSpline, vtkSpline);
88  vtkGetObjectMacro(YSpline, vtkSpline);
89  vtkGetObjectMacro(ZSpline, vtkSpline);
91 
93 
100  vtkGetObjectMacro(Points, vtkPoints);
102 
104 
109  void SetPoint(vtkIdType index, double x, double y, double z);
111 
113 
118  vtkSetMacro(Closed, vtkTypeBool);
119  vtkGetMacro(Closed, vtkTypeBool);
120  vtkBooleanMacro(Closed, vtkTypeBool);
122 
124 
128  vtkSetMacro(ParameterizeByLength, vtkTypeBool);
129  vtkGetMacro(ParameterizeByLength, vtkTypeBool);
130  vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
132 
134 
150  vtkSetClampMacro(LeftConstraint, int, 0, 3);
151  vtkGetMacro(LeftConstraint, int);
152  vtkSetClampMacro(RightConstraint, int, 0, 3);
153  vtkGetMacro(RightConstraint, int);
155 
157 
161  vtkSetMacro(LeftValue, double);
162  vtkGetMacro(LeftValue, double);
163  vtkSetMacro(RightValue, double);
164  vtkGetMacro(RightValue, double);
166 
167 protected:
170 
171  // Points definition
173 
174  // The interpolating splines for each of the x-y-z coordinates
178 
179  // Supplemental variables
183  double LeftValue;
184  double RightValue;
186 
187  // Initializing the spline
189  int Initialize();
190 
191  // Internal variable for managing parametric coordinates
192  double Length;
193  double ClosedLength;
194 
195 private:
196  vtkParametricSpline(const vtkParametricSpline&) = delete;
197  void operator=(const vtkParametricSpline&) = delete;
198 };
199 
200 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract interface for parametric functions
parametric function for 1D interpolating splines
vtkTypeBool ParameterizeByLength
~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)
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].
static vtkParametricSpline * New()
Construct the spline with the following parameters: MinimumU = 0, MaximumU = 1, JoinU = 0 (unless the...
void SetPoints(vtkPoints *)
Specify the list of points defining the spline.
void SetYSpline(vtkSpline *)
void SetZSpline(vtkSpline *)
represent and manipulate 3D points
Definition: vtkPoints.h:34
spline abstract class for interpolating splines
Definition: vtkSpline.h:63
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:338
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293