vtkEdgesCacheInternal.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkEdgesCacheInternal_h
10 #define vtkEdgesCacheInternal_h
11 
12 #include "vtkABINamespace.h"
13 #include "vtkEdgeInternal.h"
14 
15 #include "vtkNew.h" // for vtkNew
16 
17 #include <map>
18 #include <string>
19 #include <vector>
20 
22 
23 class vtkDataObject;
24 class vtkDataSet;
25 class vtkIdList;
26 class vtkPointSet;
27 
29 {
30 public:
32  vtkEdgesCacheInternal(const std::string& pointFlagArrayName, double pointFlag);
34 
38  void InvalidateCache();
39 
48  bool UpdateAttributes(vtkDataObject* input, vtkDataObject* output);
49 
50 private:
54  bool UpdateLeafAttributes(vtkDataSet* input, vtkPointSet* output);
55 
61  void CacheLeafEdges(vtkDataSet* input, vtkPointSet* output);
62 
63  std::map<vtkDataSet*, std::vector<vtkEdgeInternal>> OriginalEdges;
64  struct IdMap
65  {
66  vtkNew<vtkIdList> Source;
67  vtkNew<vtkIdList> Destination;
68  };
69  std::map<vtkDataSet*, IdMap> OriginalPoints;
70 
71  // Used to determine if a point is a copy from an input point.
72  std::string PointFlagArray;
73  double InputPointFlag;
74 };
75 
77 
78 #endif
bool UpdateAttributes(vtkDataObject *input, vtkDataObject *output)
Update PointData attributes data only.
Cache edges informations for interpolation purpose.
#define VTK_ABI_NAMESPACE_BEGIN
void InvalidateCache()
Invalidate current content.