VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkProgrammableSource.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 =========================================================================*/ 00043 #ifndef vtkProgrammableSource_h 00044 #define vtkProgrammableSource_h 00045 00046 #include "vtkFiltersSourcesModule.h" // For export macro 00047 #include "vtkDataSetAlgorithm.h" 00048 00049 class vtkPolyData; 00050 class vtkStructuredPoints; 00051 class vtkStructuredGrid; 00052 class vtkUnstructuredGrid; 00053 class vtkRectilinearGrid; 00054 00055 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataSetAlgorithm 00056 { 00057 public: 00058 static vtkProgrammableSource *New(); 00059 vtkTypeMacro(vtkProgrammableSource,vtkDataSetAlgorithm); 00060 00068 typedef void (*ProgrammableMethodCallbackType)(void *arg); 00069 00072 void SetExecuteMethod(void (*f)(void *), void *arg); 00073 00075 void SetExecuteMethodArgDelete(void (*f)(void *)); 00076 00079 void SetRequestInformationMethod(void (*f)(void *)); 00080 00085 vtkPolyData *GetPolyDataOutput(); 00086 00088 vtkStructuredPoints *GetStructuredPointsOutput(); 00089 00091 vtkStructuredGrid *GetStructuredGridOutput(); 00092 00094 vtkUnstructuredGrid *GetUnstructuredGridOutput(); 00095 00097 vtkRectilinearGrid *GetRectilinearGridOutput(); 00098 00099 protected: 00100 vtkProgrammableSource(); 00101 ~vtkProgrammableSource(); 00102 00103 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00104 virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00105 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00106 00107 ProgrammableMethodCallbackType ExecuteMethod; //function to invoke 00108 ProgrammableMethodCallbackType ExecuteMethodArgDelete; 00109 void *ExecuteMethodArg; 00110 ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke 00111 00112 vtkTimeStamp ExecuteTime; 00113 int RequestedDataType; 00114 00115 private: 00116 vtkProgrammableSource(const vtkProgrammableSource&); // Not implemented. 00117 void operator=(const vtkProgrammableSource&); // Not implemented. 00118 }; 00119 00120 #endif 00121 00122 // VTK-HeaderTest-Exclude: vtkProgrammableSource.h