00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPushPipeline.h,v $ 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 =========================================================================*/ 00031 #ifndef __vtkPushPipeline_h 00032 #define __vtkPushPipeline_h 00033 00034 #include "vtkObject.h" 00035 #define VTK_PP_MAX_INPUTS 128 00036 00037 class vtkProcessObject; 00038 class vtkDataObject; 00039 class vtkSource; 00040 class vtkPushPipelineConsumeCommand; 00041 class vtkRenderWindow; 00042 class vtkRenderer; 00043 class vtkPushPipelineProcessInfo; 00044 class vtkPushPipelineDataInfo; 00045 00046 class vtkPushPipelineWindowsType; 00047 class vtkPushPipelineProcessMapType; 00048 class vtkPushPipelineDataMapType; 00049 00050 class VTK_HYBRID_EXPORT vtkPushPipeline : public vtkObject 00051 { 00052 public: 00053 static vtkPushPipeline *New(); 00054 vtkTypeRevisionMacro(vtkPushPipeline,vtkObject); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 void AddPusher(vtkProcessObject* pusher); 00059 00061 00062 void SetInputToExecutionRatio(vtkProcessObject *po, int inNum, int ratio); 00063 void SetExecutionToOutputRatio(vtkProcessObject *po, int ratio); 00065 00067 void Push(vtkSource *pusher); 00068 00070 void Run(vtkSource *pusher); 00071 00073 00075 vtkSetMacro(RunState,int); 00076 vtkGetMacro(RunState,int); 00078 00082 void AddWindow(vtkRenderWindow *win); 00083 00084 protected: 00085 vtkPushPipeline(); 00086 ~vtkPushPipeline(); 00087 00088 //BTX 00089 friend class vtkPushPipelineProcessInfo; 00090 friend class vtkPushPipelineDataInfo; 00091 friend class vtkPushPipelineConsumeCommand; 00092 //ETX 00093 00094 vtkPushPipelineWindowsType* Windows; 00095 vtkPushPipelineProcessMapType* ProcessMap; 00096 vtkPushPipelineDataMapType* DataMap; 00097 00098 vtkPushPipelineDataInfo *GetPushDataInfo(vtkDataObject *); 00099 vtkPushPipelineProcessInfo *GetPushProcessInfo(vtkProcessObject *); 00100 int RunState; 00101 00102 void AddData(vtkDataObject *); 00103 void AddProcess(vtkProcessObject *); 00104 void Trace(vtkDataObject *); 00105 void Trace(vtkProcessObject *); 00106 void ClearTraceMarkers(); 00107 int IsRendererReady(vtkRenderer *); 00108 int IsRenderWindowReady(vtkRenderWindow *); 00109 void ConsumeRenderWindowInputs(vtkRenderWindow *); 00110 void ConsumeRendererInputs(vtkRenderer *); 00111 void RenderWindows(); 00112 void SetupWindows(); 00113 void SetupRenderWindow(vtkRenderWindow *); 00114 void SetupRenderer(vtkRenderer *); 00115 00116 private: 00117 vtkPushPipeline(const vtkPushPipeline&); // Not implemented. 00118 void operator=(const vtkPushPipeline&); // Not implemented. 00119 }; 00120 00121 #endif 00122