VTK  9.4.20250306
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
26VTK_ABI_NAMESPACE_BEGIN
29class vtkPolyData;
32class vtkImageData;
33
34class VTKRENDERINGCORE_EXPORT vtkCompositePolyDataMapperDelegator : public vtkObject
35{
36public:
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
53 {
54 bool Marked;
62
69
70 unsigned int FlatIndex;
71
76
77 double Opacity;
80
81 std::string ArrayName;
82 vtkScalarsToColors* LookupTable = nullptr;
83 vtkPolyData* PolyData = nullptr;
84 };
85
87
91 bool GetMarked() { return this->Marked; }
92 void Mark() { this->Marked = true; }
93 void Unmark()
94 {
95 this->Marked = false;
96 this->UnmarkBatchElements();
97 }
98 virtual void ClearUnmarkedBatchElements() = 0;
99 virtual void UnmarkBatchElements() = 0;
101
105 virtual std::vector<vtkPolyData*> GetRenderedList() const = 0;
106
115 virtual void SetParent(vtkCompositePolyDataMapper* mapper) = 0;
116
120 virtual void Insert(BatchElement&& element) = 0;
121
125 virtual BatchElement* Get(vtkPolyData* polydata) = 0;
126
130 virtual void Clear() = 0;
131
132protected:
135
137
138 bool Marked = false;
139
140private:
142 void operator=(const vtkCompositePolyDataMapperDelegator&) = delete;
143};
144
145VTK_ABI_NAMESPACE_END
146#endif
abstract class specifies interface to map data
Delegates rendering of multiple polydata that share similar signatures.
vtkSmartPointer< vtkPolyDataMapper > GetDelegate() noexcept
Get a reference to the delegate.
static vtkCompositePolyDataMapperDelegator * New()
virtual void ClearUnmarkedBatchElements()=0
Keep track of what data is being used as the structure can change.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Mark()
Keep track of what data is being used as the structure can change.
virtual std::vector< vtkPolyData * > GetRenderedList() const =0
Accessor to the ordered list of PolyData that we last drew.
virtual void ShallowCopy(vtkCompositePolyDataMapper *polydataMapper)
Shallow copies scalar array related properties into the delegate.
virtual void Clear()=0
Clear all batch elements.
virtual void Insert(BatchElement &&element)=0
Add input polydata and it's rendering attributes to internal storage.
virtual BatchElement * Get(vtkPolyData *polydata)=0
Get the batch element that describes attributes for a vtkPolyData.
virtual void SetParent(vtkCompositePolyDataMapper *mapper)=0
Assign a parent mapper.
void Unmark()
Keep track of what data is being used as the structure can change.
bool GetMarked()
Keep track of what data is being used as the structure can change.
virtual void UnmarkBatchElements()=0
Keep track of what data is being used as the structure can change.
a class that renders hierarchical polygonal data
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Superclass for mapping scalar values to colors.
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:332