VTK
dox/Common/ComputationalGeometry/vtkCardinalSpline.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCardinalSpline.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00033 #ifndef __vtkCardinalSpline_h
00034 #define __vtkCardinalSpline_h
00035 
00036 #include "vtkCommonComputationalGeometryModule.h" // For export macro
00037 #include "vtkSpline.h"
00038 
00039 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkCardinalSpline : public vtkSpline
00040 {
00041 public:
00042   static vtkCardinalSpline *New();
00043 
00044   vtkTypeMacro(vtkCardinalSpline,vtkSpline);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048   void Compute ();
00049 
00051   virtual double Evaluate (double t);
00052 
00054   virtual void DeepCopy(vtkSpline *s);
00055 
00056 protected:
00057   vtkCardinalSpline();
00058   ~vtkCardinalSpline() {}
00059 
00060   void Fit1D (int n, double *x, double *y, double *w, double coefficients[][4],
00061               int leftConstraint, double leftValue, int rightConstraint,
00062               double rightValue);
00063 
00064   void FitClosed1D (int n, double *x, double *y, double *w,
00065                     double coefficients[][4]);
00066 
00067 private:
00068   vtkCardinalSpline(const vtkCardinalSpline&);  // Not implemented.
00069   void operator=(const vtkCardinalSpline&);  // Not implemented.
00070 };
00071 
00072 #endif
00073