VTK  9.3.20240226
vtkMultiPieceDataSet.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
24 #ifndef vtkMultiPieceDataSet_h
25 #define vtkMultiPieceDataSet_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkPartitionedDataSet.h"
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkDataSet;
32 class VTKCOMMONDATAMODEL_EXPORT vtkMultiPieceDataSet : public vtkPartitionedDataSet
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43  int GetDataObjectType() override { return VTK_MULTIPIECE_DATA_SET; }
44 
50  void SetNumberOfPieces(unsigned int numpieces) { this->SetNumberOfPartitions(numpieces); }
51 
55  unsigned int GetNumberOfPieces() { return this->GetNumberOfPartitions(); }
56 
58 
61  vtkDataSet* GetPiece(unsigned int pieceno) { return this->GetPartition(pieceno); }
62  vtkDataObject* GetPieceAsDataObject(unsigned int pieceno)
63  {
64  return this->GetPartitionAsDataObject(pieceno);
65  }
67 
72  void SetPiece(unsigned int pieceno, vtkDataObject* piece) { this->SetPartition(pieceno, piece); }
73 
75 
81 
82 protected:
85 
86 private:
88  void operator=(const vtkMultiPieceDataSet&) = delete;
89 };
90 
91 VTK_ABI_NAMESPACE_END
92 #endif
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
composite dataset to encapsulates pieces of dataset.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
static vtkMultiPieceDataSet * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
static vtkMultiPieceDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
static vtkMultiPieceDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
~vtkMultiPieceDataSet() override
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitions.
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.
@ info
Definition: vtkX3D.h:376
#define VTK_MULTIPIECE_DATA_SET
Definition: vtkType.h:90