00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00043 #ifndef __vtkParametricSpline_h
00044 #define __vtkParametricSpline_h
00045
00046 class vtkSpline;
00047 class vtkPoints;
00048
00049 #include "vtkParametricFunction.h"
00050
00051 class VTK_FILTERING_EXPORT vtkParametricSpline : public vtkParametricFunction
00052 {
00053 public:
00054 vtkTypeMacro(vtkParametricSpline,vtkParametricFunction);
00055 void PrintSelf(ostream& os, vtkIndent indent);
00056
00061 static vtkParametricSpline *New();
00062
00064 virtual int GetDimension() {return 1;}
00065
00068 virtual void Evaluate(double u[3], double Pt[3], double Du[9]);
00069
00072 virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]);
00073
00075
00078 void SetXSpline(vtkSpline*);
00079 void SetYSpline(vtkSpline*);
00080 void SetZSpline(vtkSpline*);
00081 vtkGetObjectMacro(XSpline,vtkSpline);
00082 vtkGetObjectMacro(YSpline,vtkSpline);
00083 vtkGetObjectMacro(ZSpline,vtkSpline);
00085
00087
00090 void SetPoints(vtkPoints*);
00091 vtkGetObjectMacro(Points,vtkPoints);
00093
00095
00097 void SetNumberOfPoints(vtkIdType numPts);
00098 void SetPoint(vtkIdType index, double x, double y, double z);
00100
00102
00105 vtkSetMacro(Closed,int);
00106 vtkGetMacro(Closed,int);
00107 vtkBooleanMacro(Closed,int);
00109
00111
00113 vtkSetMacro(ParameterizeByLength,int);
00114 vtkGetMacro(ParameterizeByLength,int);
00115 vtkBooleanMacro(ParameterizeByLength,int);
00117
00119
00127 vtkSetClampMacro(LeftConstraint,int,0,3);
00128 vtkGetMacro(LeftConstraint,int);
00129 vtkSetClampMacro(RightConstraint,int,0,3);
00130 vtkGetMacro(RightConstraint,int);
00132
00134
00136 vtkSetMacro(LeftValue,double);
00137 vtkGetMacro(LeftValue,double);
00138 vtkSetMacro(RightValue,double);
00139 vtkGetMacro(RightValue,double);
00141
00142 protected:
00143 vtkParametricSpline();
00144 ~vtkParametricSpline();
00145
00146
00147 vtkPoints *Points;
00148
00149
00150 vtkSpline *XSpline;
00151 vtkSpline *YSpline;
00152 vtkSpline *ZSpline;
00153
00154
00155 int Closed;
00156 int LeftConstraint;
00157 int RightConstraint;
00158 double LeftValue;
00159 double RightValue;
00160 int ParameterizeByLength;
00161
00162
00163 unsigned long InitializeTime;
00164 int Initialize();
00165
00166
00167 double Length;
00168 double ClosedLength;
00169
00170 private:
00171 vtkParametricSpline(const vtkParametricSpline&);
00172 void operator=(const vtkParametricSpline&);
00173 };
00174
00175 #endif