VTK  9.7.1
vtkCompositePolyDataMapperDelegator.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 
14 #ifndef vtkCompositePolyDataMapperDelegator_h
15 #define vtkCompositePolyDataMapperDelegator_h
16 
17 #include "vtkObject.h"
18 
19 #include "vtkColor.h" // for ivar
20 #include "vtkRenderingCoreModule.h" // for export macro
21 #include "vtkSmartPointer.h" // for ivar
22 #include "vtkVector.h" // for ivar
23 
24 #include <memory> // for shared_ptr
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkAbstractMapper;
29 class vtkPolyData;
30 class vtkPolyDataMapper;
31 class vtkScalarsToColors;
32 class vtkTexture;
33 
34 class VTKRENDERINGCORE_EXPORT vtkCompositePolyDataMapperDelegator : public vtkObject
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  virtual void ShallowCopy(vtkCompositePolyDataMapper* polydataMapper);
45 
49  vtkSmartPointer<vtkPolyDataMapper> GetDelegate() noexcept { return this->Delegate; }
50 
51  // This class encapsulates rendering attributes for a vtkPolyData
52  struct BatchElement
53  {
54  bool Marked;
55  bool IsOpaque;
56  bool Visibility;
62 
63  int ColorMode;
67  int ArrayId;
69 
70  unsigned int FlatIndex;
71 
76 
77  double Opacity;
80 
82 
84  vtkScalarsToColors* LookupTable = nullptr;
85  vtkPolyData* PolyData = nullptr;
86  };
87 
89 
93  bool GetMarked() { return this->Marked; }
94  void Mark() { this->Marked = true; }
95  void Unmark()
96  {
97  this->Marked = false;
98  this->UnmarkBatchElements();
99  }
100  virtual void ClearUnmarkedBatchElements() = 0;
101  virtual void UnmarkBatchElements() = 0;
103 
107  virtual std::vector<vtkPolyData*> GetRenderedList() const = 0;
108 
117  virtual void SetParent(vtkCompositePolyDataMapper* mapper) = 0;
118 
122  virtual void Insert(BatchElement&& element) = 0;
123 
127  virtual BatchElement* Get(vtkPolyData* polydata) = 0;
128 
132  virtual void Clear() = 0;
133 
134 protected:
137 
139 
140  bool Marked = false;
141 
142 private:
144  void operator=(const vtkCompositePolyDataMapperDelegator&) = delete;
145 };
146 
147 VTK_ABI_NAMESPACE_END
148 #endif
void Mark()
Keep track of what data is being used as the structure can change.
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkPolyDataMapper > GetDelegate() noexcept
Get a reference to the delegate.
int vtkIdType
Definition: vtkType.h:363
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
Superclass for mapping scalar values to colors.
Delegates rendering of multiple polydata that share similar signatures.
a simple class to control print indentation
Definition: vtkIndent.h:28
bool GetMarked()
Keep track of what data is being used as the structure can change.
handles properties associated with a texture map
Definition: vtkTexture.h:58
abstract class specifies interface to map data
map vtkPolyData to graphics primitives
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
a class that renders hierarchical polygonal data
void Unmark()
Keep track of what data is being used as the structure can change.