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 =========================================================================*/
43 #ifndef vtkParametricSpline_h
44 #define vtkParametricSpline_h
45 
46 class vtkSpline;
47 class vtkPoints;
48 
49 #include "vtkCommonComputationalGeometryModule.h" // For export macro
50 #include "vtkParametricFunction.h"
51 
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
62  static vtkParametricSpline *New();
63 
65  virtual int GetDimension() {return 1;}
66 
69  virtual void Evaluate(double u[3], double Pt[3], double Du[9]);
70 
73  virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]);
74 
76 
79  void SetXSpline(vtkSpline*);
80  void SetYSpline(vtkSpline*);
81  void SetZSpline(vtkSpline*);
82  vtkGetObjectMacro(XSpline,vtkSpline);
83  vtkGetObjectMacro(YSpline,vtkSpline);
84  vtkGetObjectMacro(ZSpline,vtkSpline);
86 
88 
91  void SetPoints(vtkPoints*);
92  vtkGetObjectMacro(Points,vtkPoints);
94 
96 
98  void SetNumberOfPoints(vtkIdType numPts);
99  void SetPoint(vtkIdType index, double x, double y, double z);
101 
103 
106  vtkSetMacro(Closed,int);
107  vtkGetMacro(Closed,int);
108  vtkBooleanMacro(Closed,int);
110 
112 
114  vtkSetMacro(ParameterizeByLength,int);
115  vtkGetMacro(ParameterizeByLength,int);
116  vtkBooleanMacro(ParameterizeByLength,int);
118 
120 
128  vtkSetClampMacro(LeftConstraint,int,0,3);
129  vtkGetMacro(LeftConstraint,int);
130  vtkSetClampMacro(RightConstraint,int,0,3);
131  vtkGetMacro(RightConstraint,int);
133 
135 
137  vtkSetMacro(LeftValue,double);
138  vtkGetMacro(LeftValue,double);
139  vtkSetMacro(RightValue,double);
140  vtkGetMacro(RightValue,double);
142 
143 protected:
146 
147  // Points definition
149 
150  // The interpolating splines for each of the x-y-z coordinates
154 
155  // Supplemental variables
156  int Closed;
159  double LeftValue;
160  double RightValue;
162 
163  // Initializing the spline
164  unsigned long InitializeTime;
165  int Initialize();
166 
167  // Internal variable for managing parametric coordinates
168  double Length;
169  double ClosedLength;
170 
171 private:
172  vtkParametricSpline(const vtkParametricSpline&); // Not implemented.
173  void operator=(const vtkParametricSpline&); // Not implemented.
174 };
175 
176 #endif
unsigned long InitializeTime
virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9])=0
virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9])=0
int vtkIdType
Definition: vtkType.h:275
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT
abstract interface for parametric functions
parametric function for 1D interpolating splines
a simple class to control print indentation
Definition: vtkIndent.h:38
spline abstract class for interpolating splines
Definition: vtkSpline.h:61
virtual int GetDimension()
static vtkObject * New()
represent and manipulate 3D points
Definition: vtkPoints.h:38