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 =========================================================================*/
41 #ifndef vtkParametricSpline_h
42 #define vtkParametricSpline_h
43 
44 class vtkSpline;
45 class vtkPoints;
46 
47 #include "vtkCommonComputationalGeometryModule.h" // For export macro
48 #include "vtkParametricFunction.h"
49 
50 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
62  static vtkParametricSpline* New();
63 
67  int GetDimension() override { return 1; }
68 
73  void Evaluate(double u[3], double Pt[3], double Du[9]) override;
74 
79  double EvaluateScalar(double u[3], double Pt[3], double Du[9]) override;
80 
82 
87  void SetXSpline(vtkSpline*);
88  void SetYSpline(vtkSpline*);
89  void SetZSpline(vtkSpline*);
90  vtkGetObjectMacro(XSpline, vtkSpline);
91  vtkGetObjectMacro(YSpline, vtkSpline);
92  vtkGetObjectMacro(ZSpline, vtkSpline);
94 
96 
102  void SetPoints(vtkPoints*);
103  vtkGetObjectMacro(Points, vtkPoints);
105 
107 
111  void SetNumberOfPoints(vtkIdType numPts);
112  void SetPoint(vtkIdType index, double x, double y, double z);
114 
116 
121  vtkSetMacro(Closed, vtkTypeBool);
122  vtkGetMacro(Closed, vtkTypeBool);
123  vtkBooleanMacro(Closed, vtkTypeBool);
125 
127 
131  vtkSetMacro(ParameterizeByLength, vtkTypeBool);
132  vtkGetMacro(ParameterizeByLength, vtkTypeBool);
133  vtkBooleanMacro(ParameterizeByLength, vtkTypeBool);
135 
137 
153  vtkSetClampMacro(LeftConstraint, int, 0, 3);
154  vtkGetMacro(LeftConstraint, int);
155  vtkSetClampMacro(RightConstraint, int, 0, 3);
156  vtkGetMacro(RightConstraint, int);
158 
160 
164  vtkSetMacro(LeftValue, double);
165  vtkGetMacro(LeftValue, double);
166  vtkSetMacro(RightValue, double);
167  vtkGetMacro(RightValue, double);
169 
170 protected:
172  ~vtkParametricSpline() override;
173 
174  // Points definition
176 
177  // The interpolating splines for each of the x-y-z coordinates
181 
182  // Supplemental variables
186  double LeftValue;
187  double RightValue;
189 
190  // Initializing the spline
192  int Initialize();
193 
194  // Internal variable for managing parametric coordinates
195  double Length;
196  double ClosedLength;
197 
198 private:
199  vtkParametricSpline(const vtkParametricSpline&) = delete;
200  void operator=(const vtkParametricSpline&) = delete;
201 };
202 
203 #endif
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9])=0
Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9])=0
Performs the mapping $f(uvw)->(Pt,Duvw)$f.
int GetDimension() override
Return the parametric dimension of the class.
int vtkIdType
Definition: vtkType.h:332
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:69
abstract interface for parametric functions
parametric function for 1D interpolating splines
a simple class to control print indentation
Definition: vtkIndent.h:39
spline abstract class for interpolating splines
Definition: vtkSpline.h:62
vtkTypeBool ParameterizeByLength
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
Definition: vtkPoints.h:39