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 
21 class vtkDataObject;
22 class vtkDataSet;
23 class vtkIdList;
24 class vtkPointSet;
25 
27 {
28 public:
30  vtkEdgesCacheInternal(const std::string& pointFlagArrayName, double pointFlag);
32 
36  void InvalidateCache();
37 
46  bool UpdateAttributes(vtkDataObject* input, vtkDataObject* output);
47 
48 private:
52  bool UpdateLeafAttributes(vtkDataSet* input, vtkPointSet* output);
53 
59  void CacheLeafEdges(vtkDataSet* input, vtkPointSet* output);
60 
61  std::map<vtkDataSet*, std::vector<vtkEdgeInternal>> OriginalEdges;
62  struct IdMap
63  {
64  vtkNew<vtkIdList> Source;
65  vtkNew<vtkIdList> Destination;
66  };
67  std::map<vtkDataSet*, IdMap> OriginalPoints;
68 
69  // Used to determine if a point is a copy from an input point.
70  std::string PointFlagArray;
71  double InputPointFlag;
72 };
73 
74 #endif
bool UpdateAttributes(vtkDataObject *input, vtkDataObject *output)
Update PointData attributes data only.
Cache edges informations for interpolation purpose.
void InvalidateCache()
Invalidate current content.