VTK: Common/DataModel/vtkMultiPieceDataSet.h Source File

| VTK 9.3.1

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:
35 static vtkMultiPieceDataSet* New();
36 vtkTypeMacro(vtkMultiPieceDataSet, vtkPartitionedDataSet);
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
78 static vtkMultiPieceDataSet* GetData(vtkInformation* info);
79 static vtkMultiPieceDataSet* GetData(vtkInformationVector* v, int i = 0);
81
82 protected:
83 vtkMultiPieceDataSet();
84 ~vtkMultiPieceDataSet() override;
85
86 private:
87 vtkMultiPieceDataSet(const vtkMultiPieceDataSet&) = delete;
88 void operator=(const vtkMultiPieceDataSet&) = delete;
89 };
90
91 VTK_ABI_NAMESPACE_END
92 #endif
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMultiPieceDataSet
composite dataset to encapsulates pieces of dataset.
Definition: vtkMultiPieceDataSet.h:33
vtkMultiPieceDataSet::GetDataObjectType
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Definition: vtkMultiPieceDataSet.h:43
vtkMultiPieceDataSet::New
static vtkMultiPieceDataSet * New()
vtkMultiPieceDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiPieceDataSet::vtkMultiPieceDataSet
vtkMultiPieceDataSet()
vtkMultiPieceDataSet::SetPiece
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
Definition: vtkMultiPieceDataSet.h:72
vtkMultiPieceDataSet::GetData
static vtkMultiPieceDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkMultiPieceDataSet::GetNumberOfPieces
unsigned int GetNumberOfPieces()
Returns the number of pieces.
Definition: vtkMultiPieceDataSet.h:55
vtkMultiPieceDataSet::GetData
static vtkMultiPieceDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkMultiPieceDataSet::~vtkMultiPieceDataSet
~vtkMultiPieceDataSet() override
vtkMultiPieceDataSet::SetNumberOfPieces
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
Definition: vtkMultiPieceDataSet.h:50
vtkMultiPieceDataSet::GetPiece
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
Definition: vtkMultiPieceDataSet.h:61
vtkMultiPieceDataSet::GetPieceAsDataObject
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
Definition: vtkMultiPieceDataSet.h:62
vtkPartitionedDataSet
composite dataset to encapsulates a dataset consisting of partitions.
Definition: vtkPartitionedDataSet.h:39
vtkPartitionedDataSet::GetNumberOfPartitions
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkPartitionedDataSet::GetPartition
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
vtkPartitionedDataSet::GetPartitionAsDataObject
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
vtkPartitionedDataSet::SetNumberOfPartitions
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitions.
vtkPartitionedDataSet::SetPartition
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPartitionedDataSet.h
VTK_MULTIPIECE_DATA_SET
#define VTK_MULTIPIECE_DATA_SET
Definition: vtkType.h:90