Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkAppendPolyData.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAppendPolyData.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 =========================================================================*/
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 //ETX
00078 
00081   void SetNumberOfInputs(int num);
00082 
00083   // Set Nth input, should only be used when UserManagedInputs is true.
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   // Flag for selecting parallel streaming behavior
00104   int ParallelStreaming;
00105 
00106   // Usual data generation method
00107   virtual int RequestData(vtkInformation *, 
00108                           vtkInformationVector **, vtkInformationVector *);
00109   virtual int RequestUpdateExtent(vtkInformation *, 
00110                                   vtkInformationVector **, vtkInformationVector *);
00111   virtual int FillInputPortInformation(int, vtkInformation *);
00112 
00113   // An efficient way to append data/cells.
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   // hide the superclass' AddInput() from the user and the compiler
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&);  // Not implemented.
00129   void operator=(const vtkAppendPolyData&);  // Not implemented.
00130 };
00131 
00132 #endif
00133 
00134 

Generated on Mon Jan 21 23:07:24 2008 for VTK by  doxygen 1.4.3-20050530