• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Graphics/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 =========================================================================*/
00033 #ifndef __vtkAppendPolyData_h
00034 #define __vtkAppendPolyData_h
00035 
00036 #include "vtkPolyDataAlgorithm.h"
00037 
00038 class vtkCellArray;
00039 class vtkDataArray;
00040 class vtkPoints;
00041 class vtkPolyData;
00042 
00043 class VTK_GRAPHICS_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
00044 {
00045 public:
00046   static vtkAppendPolyData *New();
00047 
00048   vtkTypeRevisionMacro(vtkAppendPolyData,vtkPolyDataAlgorithm);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052 
00056   vtkSetMacro(UserManagedInputs,int);
00057   vtkGetMacro(UserManagedInputs,int);
00058   vtkBooleanMacro(UserManagedInputs,int);
00060 
00063   void AddInput(vtkPolyData *);
00064 
00067   void RemoveInput(vtkPolyData *);
00068 
00070 
00071   vtkPolyData *GetInput(int idx);
00072   vtkPolyData *GetInput() { return this->GetInput( 0 ); };
00074 //ETX
00075 
00078   void SetNumberOfInputs(int num);
00079 
00080   // Set Nth input, should only be used when UserManagedInputs is true.
00081   void SetInputByNumber(int num, vtkPolyData *input);
00082 
00084 
00091   vtkSetMacro(ParallelStreaming, int); 
00092   vtkGetMacro(ParallelStreaming, int); 
00093   vtkBooleanMacro(ParallelStreaming, int); 
00095 
00096 protected:
00097   vtkAppendPolyData();
00098   ~vtkAppendPolyData();
00099 
00100   // Flag for selecting parallel streaming behavior
00101   int ParallelStreaming;
00102 
00103   // Usual data generation method
00104   virtual int RequestData(vtkInformation *, 
00105                           vtkInformationVector **, vtkInformationVector *);
00106   virtual int RequestUpdateExtent(vtkInformation *, 
00107                                   vtkInformationVector **, vtkInformationVector *);
00108   virtual int FillInputPortInformation(int, vtkInformation *);
00109 
00110   // An efficient way to append data/cells.
00111   void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
00112   void AppendDifferentPoints(vtkDataArray *dest, vtkDataArray *src,
00113                              vtkIdType offset);
00114   vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
00115                          vtkIdType offset);
00116 
00117  private:
00118   // hide the superclass' AddInput() from the user and the compiler
00119   void AddInput(vtkDataObject *)
00120     { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
00121 
00122   int UserManagedInputs;
00123 
00124 private:
00125   vtkAppendPolyData(const vtkAppendPolyData&);  // Not implemented.
00126   void operator=(const vtkAppendPolyData&);  // Not implemented.
00127 };
00128 
00129 #endif
00130 
00131 

Generated by  doxygen 1.7.1