VTK  9.2.6
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 =========================================================================*/
50 #ifndef vtkParametricSpline_h
51 #define vtkParametricSpline_h
52 
53 class vtkSpline;
54 class vtkPoints;
55 
56 #include "vtkCommonComputationalGeometryModule.h" // For export macro
57 #include "vtkParametricFunction.h"
58 
59 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
72 
76  int GetDimension() override { return 1; }
77 
82  void Evaluate(double u[3], double Pt[3], double Du[9]) override;
83 
88  double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
89 
91 
99  vtkGetObjectMacro(XSpline, vtkSpline);
100  vtkGetObjectMacro(YSpline, vtkSpline);
101  vtkGetObjectMacro(ZSpline, vtkSpline);
103 
105 
112  vtkGetObjectMacro(Points, vtkPoints);
114 
116 
121  void SetPoint(vtkIdType index, double x, double y, double z);
123 
125 
130  vtkSetMacro(Closed, vtkTypeBool);
131  vtkGetMacro(Closed, vtkTypeBool);
132  vtkBooleanMacro(Closed, vtkTypeBool);
134 
136 
140  vtkSetMacro(ParameterizeByLength, vtkTypeBool);
141  vtkGetMacro(ParameterizeByLength, vtkTypeBool);
142  vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
144 
146 
162  vtkSetClampMacro(LeftConstraint, int, 0, 3);
163  vtkGetMacro(LeftConstraint, int);
164  vtkSetClampMacro(RightConstraint, int, 0, 3);
165  vtkGetMacro(RightConstraint, int);
167 
169 
173  vtkSetMacro(LeftValue, double);
174  vtkGetMacro(LeftValue, double);
175  vtkSetMacro(RightValue, double);
176  vtkGetMacro(RightValue, double);
178 
179 protected:
182 
183  // Points definition
185 
186  // The interpolating splines for each of the x-y-z coordinates
190 
191  // Supplemental variables
195  double LeftValue;
196  double RightValue;
198 
199  // Initializing the spline
201  int Initialize();
202 
203  // Internal variable for managing parametric coordinates
204  double Length;
205  double ClosedLength;
206 
207 private:
208  vtkParametricSpline(const vtkParametricSpline&) = delete;
209  void operator=(const vtkParametricSpline&) = delete;
210 };
211 
212 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
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)
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].
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 *)
By default, this class is constructed with three instances of vtkCardinalSpline (for each of the x-y-...
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:49
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:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287