VTK  9.5.20251118
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 vtkTexture;
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
82
83 std::string ArrayName;
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
134protected:
137
139
140 bool Marked = false;
141
142private:
144 void operator=(const vtkCompositePolyDataMapperDelegator&) = delete;
145};
146
147VTK_ABI_NAMESPACE_END
148#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
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.
handles properties associated with a texture map
Definition vtkTexture.h:168
int vtkIdType
Definition vtkType.h:367