VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTimeSourceExample.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 =========================================================================*/ 00027 #ifndef vtkTimeSourceExample_h 00028 #define vtkTimeSourceExample_h 00029 00030 #include "vtkFiltersGeneralModule.h" // For export macro 00031 #include "vtkUnstructuredGridAlgorithm.h" 00032 00033 class VTKFILTERSGENERAL_EXPORT vtkTimeSourceExample : public vtkUnstructuredGridAlgorithm 00034 { 00035 public: 00036 static vtkTimeSourceExample *New(); 00037 vtkTypeMacro(vtkTimeSourceExample,vtkUnstructuredGridAlgorithm); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 00041 00044 vtkSetClampMacro(Analytic, int, 0, 1); 00045 vtkGetMacro(Analytic, int); 00046 vtkBooleanMacro(Analytic, int); 00048 00050 00053 vtkSetMacro(XAmplitude, double); 00054 vtkGetMacro(XAmplitude, double); 00055 vtkSetMacro(YAmplitude, double); 00056 vtkGetMacro(YAmplitude, double); 00058 00060 00063 vtkSetClampMacro(Growing, int, 0, 1); 00064 vtkGetMacro(Growing, int); 00065 vtkBooleanMacro(Growing, int); 00067 00068 protected: 00069 vtkTimeSourceExample(); 00070 ~vtkTimeSourceExample(); 00071 00072 virtual int RequestInformation(vtkInformation*, 00073 vtkInformationVector**, 00074 vtkInformationVector*); 00075 00076 virtual int RequestData(vtkInformation*, 00077 vtkInformationVector**, 00078 vtkInformationVector*); 00079 00080 00081 void LookupTimeAndValue(double &time, double &value); 00082 double ValueFunction(double time); 00083 double XFunction(double time); 00084 double YFunction(double time); 00085 int NumCellsFunction(double time); 00086 00087 int Analytic; 00088 double XAmplitude; 00089 double YAmplitude; 00090 int Growing; 00091 00092 int NumSteps; 00093 double *Steps; 00094 double *Values; 00095 private: 00096 vtkTimeSourceExample(const vtkTimeSourceExample&); // Not implemented. 00097 void operator=(const vtkTimeSourceExample&); // Not implemented. 00098 }; 00099 00100 #endif 00101