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 "vtkParametricFunction.h"
50 
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
61  static vtkParametricSpline *New();
62 
64  virtual int GetDimension() {return 1;}
65 
68  virtual void Evaluate(double u[3], double Pt[3], double Du[9]);
69 
72  virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]);
73 
75 
78  void SetXSpline(vtkSpline*);
79  void SetYSpline(vtkSpline*);
80  void SetZSpline(vtkSpline*);
81  vtkGetObjectMacro(XSpline,vtkSpline);
82  vtkGetObjectMacro(YSpline,vtkSpline);
83  vtkGetObjectMacro(ZSpline,vtkSpline);
85 
87 
90  void SetPoints(vtkPoints*);
91  vtkGetObjectMacro(Points,vtkPoints);
93 
95 
97  void SetNumberOfPoints(vtkIdType numPts);
98  void SetPoint(vtkIdType index, double x, double y, double z);
100 
102 
105  vtkSetMacro(Closed,int);
106  vtkGetMacro(Closed,int);
107  vtkBooleanMacro(Closed,int);
109 
111 
113  vtkSetMacro(ParameterizeByLength,int);
114  vtkGetMacro(ParameterizeByLength,int);
115  vtkBooleanMacro(ParameterizeByLength,int);
117 
119 
127  vtkSetClampMacro(LeftConstraint,int,0,3);
128  vtkGetMacro(LeftConstraint,int);
129  vtkSetClampMacro(RightConstraint,int,0,3);
130  vtkGetMacro(RightConstraint,int);
132 
134 
136  vtkSetMacro(LeftValue,double);
137  vtkGetMacro(LeftValue,double);
138  vtkSetMacro(RightValue,double);
139  vtkGetMacro(RightValue,double);
141 
142 protected:
145 
146  // Points definition
148 
149  // The interpolating splines for each of the x-y-z coordinates
153 
154  // Supplemental variables
155  int Closed;
158  double LeftValue;
159  double RightValue;
161 
162  // Initializing the spline
163  unsigned long InitializeTime;
164  int Initialize();
165 
166  // Internal variable for managing parametric coordinates
167  double Length;
168  double ClosedLength;
169 
170 private:
171  vtkParametricSpline(const vtkParametricSpline&); // Not implemented.
172  void operator=(const vtkParametricSpline&); // Not implemented.
173 };
174 
175 #endif