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 =========================================================================*/
44 #ifndef vtkParametricSpline_h
45 #define vtkParametricSpline_h
46 
47 class vtkSpline;
48 class vtkPoints;
49 
50 #include "vtkCommonComputationalGeometryModule.h" // For export macro
51 #include "vtkParametricFunction.h"
52 
53 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricSpline : public vtkParametricFunction
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
65  static vtkParametricSpline *New();
66 
70  int GetDimension() VTK_OVERRIDE {return 1;}
71 
76  void Evaluate(double u[3], double Pt[3], double Du[9]) VTK_OVERRIDE;
77 
82  double EvaluateScalar(double u[3], double Pt[3], double Du[9]) VTK_OVERRIDE;
83 
85 
90  void SetXSpline(vtkSpline*);
91  void SetYSpline(vtkSpline*);
92  void SetZSpline(vtkSpline*);
93  vtkGetObjectMacro(XSpline,vtkSpline);
94  vtkGetObjectMacro(YSpline,vtkSpline);
95  vtkGetObjectMacro(ZSpline,vtkSpline);
97 
99 
105  void SetPoints(vtkPoints*);
106  vtkGetObjectMacro(Points,vtkPoints);
108 
110 
114  void SetNumberOfPoints(vtkIdType numPts);
115  void SetPoint(vtkIdType index, double x, double y, double z);
117 
119 
124  vtkSetMacro(Closed,int);
125  vtkGetMacro(Closed,int);
126  vtkBooleanMacro(Closed,int);
128 
130 
134  vtkSetMacro(ParameterizeByLength,int);
135  vtkGetMacro(ParameterizeByLength,int);
136  vtkBooleanMacro(ParameterizeByLength,int);
138 
140 
156  vtkSetClampMacro(LeftConstraint,int,0,3);
157  vtkGetMacro(LeftConstraint,int);
158  vtkSetClampMacro(RightConstraint,int,0,3);
159  vtkGetMacro(RightConstraint,int);
161 
163 
167  vtkSetMacro(LeftValue,double);
168  vtkGetMacro(LeftValue,double);
169  vtkSetMacro(RightValue,double);
170  vtkGetMacro(RightValue,double);
172 
173 protected:
175  ~vtkParametricSpline() VTK_OVERRIDE;
176 
177  // Points definition
178  vtkPoints *Points;
179 
180  // The interpolating splines for each of the x-y-z coordinates
181  vtkSpline *XSpline;
182  vtkSpline *YSpline;
183  vtkSpline *ZSpline;
184 
185  // Supplemental variables
186  int Closed;
187  int LeftConstraint;
188  int RightConstraint;
189  double LeftValue;
190  double RightValue;
191  int ParameterizeByLength;
192 
193  // Initializing the spline
194  vtkMTimeType InitializeTime;
195  int Initialize();
196 
197  // Internal variable for managing parametric coordinates
198  double Length;
199  double ClosedLength;
200 
201 private:
202  vtkParametricSpline(const vtkParametricSpline&) VTK_DELETE_FUNCTION;
203  void operator=(const vtkParametricSpline&) VTK_DELETE_FUNCTION;
204 };
205 
206 #endif
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:287
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
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
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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