VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPStreamTracer.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 =========================================================================*/ 00026 #ifndef __vtkPStreamTracer_h 00027 #define __vtkPStreamTracer_h 00028 00029 #include "vtkStreamTracer.h" 00030 00031 #include "vtkSmartPointer.h" // This is a leaf node. No need to use PIMPL to avoid compile time penalty. 00032 #include <vector> // STL Header; Required for vector 00033 00034 class vtkAbstractInterpolatedVelocityField; 00035 class vtkMultiProcessController; 00036 00037 class VTK_PARALLEL_EXPORT vtkPStreamTracer : public vtkStreamTracer 00038 { 00039 public: 00040 vtkTypeMacro(vtkPStreamTracer,vtkStreamTracer); 00041 virtual void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00047 virtual void SetController(vtkMultiProcessController* controller); 00048 vtkGetObjectMacro(Controller, vtkMultiProcessController); 00050 00051 protected: 00052 00053 vtkPStreamTracer(); 00054 ~vtkPStreamTracer(); 00055 00056 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00057 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00058 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00059 00060 vtkMultiProcessController* Controller; 00061 00062 vtkAbstractInterpolatedVelocityField* Interpolator; 00063 void SetInterpolator(vtkAbstractInterpolatedVelocityField*); 00064 00065 // See the implementation for comments 00066 void SendCellPoint(vtkPolyData* data, 00067 vtkIdType streamId, 00068 vtkIdType idx, 00069 int sendToId); 00070 void ReceiveCellPoint(vtkPolyData* tomod, int streamId, vtkIdType idx); 00071 void SendFirstPoints(vtkPolyData *output); 00072 void ReceiveLastPoints(vtkPolyData *output); 00073 void MoveToNextSend(vtkPolyData *output); 00074 00075 virtual void ParallelIntegrate() = 0; 00076 00077 vtkDataArray* Seeds; 00078 vtkIdList* SeedIds; 00079 vtkIntArray* IntegrationDirections; 00080 00081 int EmptyData; 00082 00083 //BTX 00084 typedef std::vector< vtkSmartPointer<vtkPolyData> > TmpOutputsType; 00085 //ETX 00086 00087 TmpOutputsType TmpOutputs; 00088 00089 private: 00090 vtkPStreamTracer(const vtkPStreamTracer&); // Not implemented. 00091 void operator=(const vtkPStreamTracer&); // Not implemented. 00092 }; 00093 00094 00095 #endif 00096 00097