Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Graphics/vtkAppendPolyData.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkAppendPolyData.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00054 #ifndef __vtkAppendPolyData_h
    00055 #define __vtkAppendPolyData_h
    00056
    00057 #include "vtkPolyDataToPolyDataFilter.h"
    00058
    00059 class vtkCellArray;
    00060 class vtkDataArray;
    00061 class vtkPoints;
    00062 class vtkPolyData;
    00063
    00064 class VTK_GRAPHICS_EXPORT vtkAppendPolyData : public vtkPolyDataToPolyDataFilter
    00065 {
    00066 public:
    00067   static vtkAppendPolyData *New();
    00068
    00069   vtkTypeRevisionMacro(vtkAppendPolyData,vtkPolyDataToPolyDataFilter);
    00070   void PrintSelf(ostream& os, vtkIndent indent);
    00071
    00073
    00077   vtkSetMacro(UserManagedInputs,int);
    00078   vtkGetMacro(UserManagedInputs,int);
    00079   vtkBooleanMacro(UserManagedInputs,int);
    00081
    00084   void AddInput(vtkPolyData *);
    00085
    00088   void RemoveInput(vtkPolyData *);
    00089
    00091
    00092   vtkPolyData *GetInput(int idx);
    00093   vtkPolyData *GetInput() { return this->GetInput( 0 ); };
    00095
    00098   void SetNumberOfInputs(int num);
    00099
    00100   // Set Nth input, should only be used when UserManagedInputs is true.
    00101   void SetInputByNumber(int num, vtkPolyData *input);
    00102
    00104
    00111   vtkSetMacro(ParallelStreaming, int);
    00112   vtkGetMacro(ParallelStreaming, int);
    00113   vtkBooleanMacro(ParallelStreaming, int);
    00115
    00116 protected:
    00117   vtkAppendPolyData();
    00118   ~vtkAppendPolyData();
    00119
    00120   // Flag for selecting parallel streaming behavior
    00121   int ParallelStreaming;
    00122
    00123   // Usual data generation method
    00124   void Execute();
    00125
    00126   void ComputeInputUpdateExtents(vtkDataObject *output);
    00127
    00128   // An efficient way to append data/cells.
    00129   void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
    00130   void AppendDifferentPoints(vtkDataArray *dest, vtkDataArray *src,
    00131                              vtkIdType offset);
    00132   vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
    00133                          vtkIdType offset);
    00134
    00135  private:
    00136   // hide the superclass' AddInput() from the user and the compiler
    00137   void AddInput(vtkDataObject *)
    00138     { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
    00139   void RemoveInput(vtkDataObject *input)
    00140     { this->vtkProcessObject::RemoveInput(input);
    00141     this->vtkProcessObject::SqueezeInputArray();};
    00142   int UserManagedInputs;
    00143 private:
    00144   vtkAppendPolyData(const vtkAppendPolyData&);  // Not implemented.
    00145   void operator=(const vtkAppendPolyData&);  // Not implemented.
    00146 };
    00147
    00148 #endif
    00149
    00150