VTK
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 
59  static vtkParametricSpline *New();
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 
84  void SetXSpline(vtkSpline*);
85  void SetYSpline(vtkSpline*);
86  void SetZSpline(vtkSpline*);
87  vtkGetObjectMacro(XSpline,vtkSpline);
88  vtkGetObjectMacro(YSpline,vtkSpline);
89  vtkGetObjectMacro(ZSpline,vtkSpline);
91 
93 
99  void SetPoints(vtkPoints*);
100  vtkGetObjectMacro(Points,vtkPoints);
102 
104 
108  void SetNumberOfPoints(vtkIdType numPts);
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:
169  ~vtkParametricSpline() override;
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
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
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:345
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:33
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:33