VTK  9.7.20261007
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
48
49VTK_ABI_NAMESPACE_BEGIN
50class vtkAlgorithm;
53
54class VTKVIEWSSCIVIS_EXPORT VTK_MARSHALAUTO vtkBlockProperties : public vtkObject
55{
56public:
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
66 void SetVisibility(unsigned int index, bool visible);
67 bool GetVisibility(unsigned int index);
69
71
76 void SetColor(unsigned int index, double r, double g, double b);
77 void GetColor(unsigned int index, double color[3]);
79
81
85 void SetOpacity(unsigned int index, double opacity);
86 double GetOpacity(unsigned int index);
88
93 void Reset();
94
102
104
114 void SetRepresentation(vtkAlgorithm* representation);
116
117protected:
120
121private:
122 vtkBlockProperties(const vtkBlockProperties&) = delete;
123 void operator=(const vtkBlockProperties&) = delete;
124
130 bool Prepare();
131
132 vtkWeakPointer<vtkAlgorithm> Representation;
134};
135
136VTK_ABI_NAMESPACE_END
137#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 VTK_MARSHALAUTO
#define vtkAlgorithm