VTK  9.7.1
MeshCacheMockAlgorithms.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
3 
4 #ifndef MeshCacheMockAlgorithms_h
5 #define MeshCacheMockAlgorithms_h
6 
7 #include "vtkNew.h"
10 #include "vtkPolyDataAlgorithm.h"
11 #include "vtkSetGet.h"
12 
13 #include <array>
14 
15 VTK_ABI_NAMESPACE_BEGIN
16 
19 
20 //------------------------------------------------------------------------------
21 namespace mockArraysName
22 {
23 const std::string pointIds = "pointIds";
24 const std::string pointData = "pointData";
25 };
26 
27 //------------------------------------------------------------------------------
35 {
36  vtkNew<vtkPolyData> SourceOutput;
37  int StartData = 0;
38  bool GenerateGhosts = false;
39 
40 public:
42  static vtkStaticDataSource* New();
43 
45  ~vtkStaticDataSource() override = default;
46 
47  vtkSetMacro(StartData, int);
48 
49  vtkSetMacro(GenerateGhosts, bool);
50 
51  void MarkGhostsModified();
52 
53  int RequestData(
54  vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) override;
55 
56  // mark polydata points as modified
57  void MarkMeshModified();
58 };
59 
60 //------------------------------------------------------------------------------
66 {
69  vtkNew<vtkStaticDataSource> SecondData;
70 
71 public:
73  static vtkStaticCompositeSource* New();
74 
76  ~vtkStaticCompositeSource() override = default;
77 
78  int RequestData(
79  vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) override;
80 
85  void SetStartData(int start);
86 
90  void MarkMeshModified();
91 };
92 
93 //------------------------------------------------------------------------------
99 {
100 public:
102  static vtkConsumerDataFilter* New();
103 
104  int RequestData(vtkInformation*, vtkInformationVector** inputVector,
105  vtkInformationVector* outputVector) override;
106 
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 
115 #endif
void MarkMeshModified()
Forward to internal vtkStaticDataSource to mark points as modified.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *outputVector) override
This is called by the superclass.
Simple filter that will be our cache consumer.
const std::string pointData
abstract superclass for composite (multi-block or AMR) datasets
Superclass for algorithms that produce only polydata as output.
void SetStartData(int start)
Forward to internal vtkStaticDataSource.
const std::string pointIds
Superclass for algorithms that produce vtkPartitionedDataSetCollectionAlgorithm.
static vtkStaticCompositeSource * New()
static vtkConsumerDataFilter * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *outputVector) override
Methods for subclasses to override to handle different pipeline requests.
int RequestData(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
~vtkStaticDataSource() override=default
~vtkStaticCompositeSource() override=default
vtkCompositeDataSet * GetCompositeOutput()
Get output data as composite dataset.
Simple source that create a composite (PartitionedDataSetCollection) of 2 polydata.
Store zero or more vtkInformation instances.
static vtkStaticDataSource * New()
Simple source that create a polydata (triangle) with point data arrays:
Composite dataset that groups datasets as a collection.