VTK  9.7.20260824
vtkBlockProperties.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
40
41#ifndef vtkBlockProperties_h
42#define vtkBlockProperties_h
43
44#include "vtkObject.h"
45#include "vtkViewsScivisModule.h" // For export macro
46#include "vtkWeakPointer.h" // For ivars
47
48VTK_ABI_NAMESPACE_BEGIN
49class vtkAlgorithm;
52
53class VTKVIEWSSCIVIS_EXPORT vtkBlockProperties : public vtkObject
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
65 void SetVisibility(unsigned int index, bool visible);
66 bool GetVisibility(unsigned int index);
68
70
75 void SetColor(unsigned int index, double r, double g, double b);
76 void GetColor(unsigned int index, double color[3]);
78
80
84 void SetOpacity(unsigned int index, double opacity);
85 double GetOpacity(unsigned int index);
87
92 void Reset();
93
101
103
113 void SetRepresentation(vtkAlgorithm* representation);
115
116protected:
119
120private:
121 vtkBlockProperties(const vtkBlockProperties&) = delete;
122 void operator=(const vtkBlockProperties&) = delete;
123
129 bool Prepare();
130
131 vtkWeakPointer<vtkAlgorithm> Representation;
133};
134
135VTK_ABI_NAMESPACE_END
136#endif
void SetMapper(vtkCompositePolyDataMapper *mapper)
The mapper these properties are applied to, and the representation that has to be up to date before a...
void SetRepresentation(vtkAlgorithm *representation)
The mapper these properties are applied to, and the representation that has to be up to date before a...
double GetOpacity(unsigned int index)
How opaque the block at index is, in place of the representation's own opacity.
~vtkBlockProperties() override
void SetVisibility(unsigned int index, bool visible)
Whether the block at index is drawn.
void SetColor(unsigned int index, double r, double g, double b)
The color of the block at index, in place of the color the whole representation is drawn in.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetColor(unsigned int index, double color[3])
The color of the block at index, in place of the color the whole representation is drawn in.
static vtkBlockProperties * New()
void Reset()
Forget everything set per block, so that every block is drawn like the rest of the representation aga...
bool GetVisibility(unsigned int index)
Whether the block at index is drawn.
void SetOpacity(unsigned int index, double opacity)
How opaque the block at index is, in place of the representation's own opacity.
vtkCompositeDataDisplayAttributes * GetDisplayAttributes()
The attributes object these are stored in, for what is not covered here: per-block textures,...
Rendering attributes for a multi-block dataset.
a class that renders hierarchical polygonal data
a simple class to control print indentation
Definition vtkIndent.h:108
a weak reference to a vtkObject.
#define vtkAlgorithm