00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkAppendPolyData_h
00037 #define __vtkAppendPolyData_h
00038
00039 #include "vtkPolyDataAlgorithm.h"
00040
00041 class vtkCellArray;
00042 class vtkDataArray;
00043 class vtkPoints;
00044 class vtkPolyData;
00045
00046 class VTK_GRAPHICS_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
00047 {
00048 public:
00049 static vtkAppendPolyData *New();
00050
00051 vtkTypeRevisionMacro(vtkAppendPolyData,vtkPolyDataAlgorithm);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00059 vtkSetMacro(UserManagedInputs,int);
00060 vtkGetMacro(UserManagedInputs,int);
00061 vtkBooleanMacro(UserManagedInputs,int);
00063
00066 void AddInput(vtkPolyData *);
00067
00070 void RemoveInput(vtkPolyData *);
00071
00073
00074 vtkPolyData *GetInput(int idx);
00075 vtkPolyData *GetInput() { return this->GetInput( 0 ); };
00077
00078
00081 void SetNumberOfInputs(int num);
00082
00083
00084 void SetInputByNumber(int num, vtkPolyData *input);
00085
00087
00094 vtkSetMacro(ParallelStreaming, int);
00095 vtkGetMacro(ParallelStreaming, int);
00096 vtkBooleanMacro(ParallelStreaming, int);
00098
00099 protected:
00100 vtkAppendPolyData();
00101 ~vtkAppendPolyData();
00102
00103
00104 int ParallelStreaming;
00105
00106
00107 virtual int RequestData(vtkInformation *,
00108 vtkInformationVector **, vtkInformationVector *);
00109 virtual int RequestUpdateExtent(vtkInformation *,
00110 vtkInformationVector **, vtkInformationVector *);
00111 virtual int FillInputPortInformation(int, vtkInformation *);
00112
00113
00114 void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
00115 void AppendDifferentPoints(vtkDataArray *dest, vtkDataArray *src,
00116 vtkIdType offset);
00117 vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
00118 vtkIdType offset);
00119
00120 private:
00121
00122 void AddInput(vtkDataObject *)
00123 { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
00124
00125 int UserManagedInputs;
00126
00127 private:
00128 vtkAppendPolyData(const vtkAppendPolyData&);
00129 void operator=(const vtkAppendPolyData&);
00130 };
00131
00132 #endif
00133
00134