Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Filtering/vtkSpline.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSpline.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00043 #ifndef __vtkSpline_h 00044 #define __vtkSpline_h 00045 00046 #include "vtkObject.h" 00047 00048 class vtkPiecewiseFunction; 00049 00050 class VTK_FILTERING_EXPORT vtkSpline : public vtkObject 00051 { 00052 public: 00053 vtkTypeRevisionMacro(vtkSpline,vtkObject); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00056 #ifndef VTK_REMOVE_LEGACY_CODE 00057 00058 virtual vtkSpline* MakeObject(); 00059 #endif 00060 00062 00064 vtkSetMacro(ClampValue,int); 00065 vtkGetMacro(ClampValue,int); 00066 vtkBooleanMacro(ClampValue,int); 00068 00070 virtual void Compute () = 0; 00071 00073 virtual float Evaluate (float t) = 0; 00074 00076 void AddPoint (float t, float x); 00077 00079 void RemovePoint (float t); 00080 00082 void RemoveAllPoints (); 00083 00085 00088 vtkSetMacro(Closed,int); 00089 vtkGetMacro(Closed,int); 00090 vtkBooleanMacro(Closed,int); 00092 00094 00102 vtkSetClampMacro(LeftConstraint,int,0,3); 00103 vtkGetMacro(LeftConstraint,int); 00104 vtkSetClampMacro(RightConstraint,int,0,3); 00105 vtkGetMacro(RightConstraint,int); 00107 00109 00111 vtkSetMacro(LeftValue,float); 00112 vtkGetMacro(LeftValue,float); 00113 vtkSetMacro(RightValue,float); 00114 vtkGetMacro(RightValue,float); 00116 00118 unsigned long GetMTime(); 00119 00121 virtual void DeepCopy(vtkSpline *s); 00122 00123 protected: 00124 vtkSpline(); 00125 ~vtkSpline (); 00126 00127 unsigned long ComputeTime; 00128 int ClampValue; 00129 float *Intervals; 00130 float *Coefficients; 00131 int LeftConstraint; 00132 float LeftValue; 00133 int RightConstraint; 00134 float RightValue; 00135 vtkPiecewiseFunction *PiecewiseFunction; 00136 int Closed; 00137 00138 // Helper methods 00139 float ComputeLeftDerivative(); 00140 float ComputeRightDerivative(); 00141 00142 private: 00143 vtkSpline(const vtkSpline&); // Not implemented. 00144 void operator=(const vtkSpline&); // Not implemented. 00145 }; 00146 00147 #endif 00148