VTK
dox/Graphics/vtkTimeSourceExample.h
Go to the documentation of this file.
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 "vtkUnstructuredGridAlgorithm.h"
00031 
00032 class VTK_GRAPHICS_EXPORT vtkTimeSourceExample : public vtkUnstructuredGridAlgorithm
00033 {
00034 public:
00035   static vtkTimeSourceExample *New();
00036   vtkTypeMacro(vtkTimeSourceExample,vtkUnstructuredGridAlgorithm);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040 
00043   vtkSetClampMacro(Analytic, int, 0, 1);
00044   vtkGetMacro(Analytic, int);
00045   vtkBooleanMacro(Analytic, int);
00047 
00049 
00052   vtkSetMacro(XAmplitude, double);
00053   vtkGetMacro(XAmplitude, double);
00054   vtkSetMacro(YAmplitude, double);
00055   vtkGetMacro(YAmplitude, double);
00057 
00059 
00062   vtkSetClampMacro(Growing, int, 0, 1);
00063   vtkGetMacro(Growing, int);
00064   vtkBooleanMacro(Growing, int);
00066 
00067 protected:
00068   vtkTimeSourceExample();
00069   ~vtkTimeSourceExample();
00070 
00071   virtual int RequestInformation(vtkInformation*, 
00072                                  vtkInformationVector**, 
00073                                  vtkInformationVector*);
00074 
00075   virtual int RequestData(vtkInformation*, 
00076                           vtkInformationVector**, 
00077                           vtkInformationVector*);
00078 
00079 
00080   void LookupTimeAndValue(double &time, double &value);
00081   double ValueFunction(double time);
00082   double XFunction(double time);
00083   double YFunction(double time);
00084   int NumCellsFunction(double time);
00085 
00086   int Analytic;
00087   double XAmplitude;
00088   double YAmplitude;
00089   int Growing;
00090 
00091   int NumSteps;
00092   double *Steps;
00093   double *Values;
00094 private:
00095   vtkTimeSourceExample(const vtkTimeSourceExample&);  // Not implemented.
00096   void operator=(const vtkTimeSourceExample&);  // Not implemented.
00097 };
00098 
00099 #endif
00100