 |
VTK
9.1.0
|
Go to the documentation of this file.
46 #ifndef vtkCompositeDataDisplayAttributes_h
47 #define vtkCompositeDataDisplayAttributes_h
49 #include <unordered_map>
53 #include "vtkRenderingCoreModule.h"
225 const unsigned int flat_index,
vtkDataObject* parent_obj,
unsigned int current_flat_index = 0);
229 for (
auto entry : this->BlockVisibilities)
231 if (visitor(entry.first, entry.second))
257 using BoolMap = std::unordered_map<vtkDataObject*, bool>;
258 using DoubleMap = std::unordered_map<vtkDataObject*, double>;
259 using ColorMap = std::unordered_map<vtkDataObject*, vtkColor3d>;
260 using StringMap = std::unordered_map<vtkDataObject*, std::string>;
262 BoolMap BlockVisibilities;
263 ColorMap BlockColors;
264 DoubleMap BlockOpacities;
265 StringMap BlockMaterials;
266 BoolMap BlockPickabilities;
269 #endif // vtkCompositeDataDisplayAttributes_h
void SetBlockVisibility(vtkDataObject *data_object, bool visible)
Set/get the visibility for the block with data_object.
bool HasBlockOpacity(vtkDataObject *data_object) const
Returns true if the block with data_object has an opacity set.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RemoveBlockMaterials()
Removes all block materialss.
bool HasBlockPickability(vtkDataObject *data_object) const
Returns true if the block with the given data_object has a pickability set.
void RemoveBlockColor(vtkDataObject *data_object)
Removes the block color for the block with data_object.
bool HasBlockPickabilities() const
Returns true if any block has any block pickability is set.
void SetBlockColor(vtkDataObject *data_object, const double color[3])
Set/get the color for the block with data_object.
abstract base class for most VTK objects
static vtkDataObject * DataObjectFromIndex(const unsigned int flat_index, vtkDataObject *parent_obj, unsigned int current_flat_index=0)
Get the DataObject corresponding to the node with index flat_index under parent_obj.
void RemoveBlockVisibility(vtkDataObject *data_object)
Removes the block visibility flag for the block with data_object.
void RemoveBlockMaterial(vtkDataObject *data_object)
Removes the set material for the block with data_object.
const std::string & GetBlockMaterial(vtkDataObject *data_object) const
Set/get the material for the block with data_object.
bool GetBlockVisibility(vtkDataObject *data_object) const
Set/get the visibility for the block with data_object.
~vtkCompositeDataDisplayAttributes() override
void GetBlockColor(vtkDataObject *data_object, double color[3]) const
Set/get the color for the block with data_object.
static vtkCompositeDataDisplayAttributes * New()
Rendering attributes for a multi-block dataset.
bool HasBlockColors() const
Returns true if any block has any block color is set.
Fast, simple class for representing and operating on 3D bounds.
bool HasBlockMaterial(vtkDataObject *data_object) const
Returns true if the block with data_object has an material set.
void RemoveBlockOpacities()
Removes all block opacities.
bool GetBlockPickability(vtkDataObject *data_object) const
Set/get the pickability for the block with data_object.
bool HasBlockMaterials() const
Returns true if any block has an material set.
a simple class to control print indentation
bool HasBlockOpacities() const
Returns true if any block has an opacity set.
void RemoveBlockPickabilities()
Removes all block pickability flags.
static void ComputeVisibleBounds(vtkCompositeDataDisplayAttributes *cda, vtkDataObject *dobj, double bounds[6])
If the input dobj is a vtkCompositeDataSet, we will loop over the hierarchy recursively starting from...
vtkCompositeDataDisplayAttributes()
void RemoveBlockColors()
Removes all block colors.
double GetBlockOpacity(vtkDataObject *data_object) const
Set/get the opacity for the block with data_object.
bool HasBlockVisibility(vtkDataObject *data_object) const
Returns true if the block with the given data_object has a visibility set.
void RemoveBlockPickability(vtkDataObject *data_object)
Removes the block pickability flag for the block with data_object.
vtkColor3d GetBlockColor(vtkDataObject *data_object) const
Set/get the color for the block with data_object.
void SetBlockMaterial(vtkDataObject *data_object, const std::string &material)
Set/get the material for the block with data_object.
void SetBlockOpacity(vtkDataObject *data_object, double opacity)
Set/get the opacity for the block with data_object.
void RemoveBlockOpacity(vtkDataObject *data_object)
Removes the set opacity for the block with data_object.
bool HasBlockColor(vtkDataObject *data_object) const
Returns true if the block with the given data_object has a color.
general representation of visualization data
bool HasBlockVisibilities() const
Returns true if any block has any block visibility is set.
void SetBlockPickability(vtkDataObject *data_object, bool visible)
Set/get the pickability for the block with data_object.
void VisitVisibilities(std::function< bool(vtkDataObject *, bool)> visitor)
void RemoveBlockVisibilities()
Removes all block visibility flags.