VTK  9.5.20250911
vtkAppendPolyData.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
139#ifndef vtkAppendPolyData_h
140#define vtkAppendPolyData_h
141
142#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_5_0
143#include "vtkFiltersCoreModule.h" // For export macro
144#include "vtkPolyDataAlgorithm.h"
145#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
146
147VTK_ABI_NAMESPACE_BEGIN
148class vtkCellArray;
149class vtkDataArray;
150class vtkPoints;
151class vtkPolyData;
152
153class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkAppendPolyData : public vtkPolyDataAlgorithm
154{
155public:
157
159 void PrintSelf(ostream& os, vtkIndent indent) override;
160
162
168 vtkSetMacro(UserManagedInputs, vtkTypeBool);
169 vtkGetMacro(UserManagedInputs, vtkTypeBool);
170 vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
172
178
184
186
190 vtkPolyData* GetInput() { return this->GetInput(0); }
192
197 void SetNumberOfInputs(int num);
198
199 // Set Nth input, should only be used when UserManagedInputs is true.
202
204
214 vtkSetMacro(ParallelStreaming, vtkTypeBool);
215 vtkGetMacro(ParallelStreaming, vtkTypeBool);
216 vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
218
220
225 vtkSetMacro(OutputPointsPrecision, int);
226 vtkGetMacro(OutputPointsPrecision, int);
228
229 int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
230 VTK_SIZEHINT(inputs, numInputs);
231
232protected:
235
236 // Flag for selecting parallel streaming behavior
239
240 // Usual data generation method
244
245 // An efficient templated way to append data.
246 VTK_DEPRECATED_IN_9_5_0("This function has been deprecated")
247 void AppendData(vtkDataArray* dest, vtkDataArray* src, vtkIdType offset);
248
249 // An efficient way to append cells.
250 VTK_DEPRECATED_IN_9_5_0("This function has been deprecated")
251 void AppendCells(vtkCellArray* dst, vtkCellArray* src, vtkIdType offset);
252
253private:
254 // hide the superclass' AddInput() from the user and the compiler
255 void AddInputData(vtkDataObject*)
256 {
257 vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
258 }
259
260 vtkTypeBool UserManagedInputs;
261
262 vtkAppendPolyData(const vtkAppendPolyData&) = delete;
263 void operator=(const vtkAppendPolyData&) = delete;
264};
265
266VTK_ABI_NAMESPACE_END
267#endif
Proxy object to connect input/output ports.
appends one or more polygonal datasets together
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AddInputData(vtkPolyData *)
Add a dataset to the list of data to append.
void RemoveInputData(vtkPolyData *)
Remove a dataset from the list of data to append.
~vtkAppendPolyData() override
vtkTypeBool ParallelStreaming
int ExecuteAppend(vtkPolyData *output, vtkPolyData *inputs[], int numInputs)
vtkPolyData * GetInput(int idx)
Get any input of this filter.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkAppendPolyData * New()
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
vtkPolyData * GetInput()
Get any input of this filter.
void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
void SetInputDataByNumber(int num, vtkPolyData *ds)
object to represent cell connectivity
abstract superclass for arrays of numeric data
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_5_0(reason)
int vtkIdType
Definition vtkType.h:332
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO