VTK  9.4.20241221
vtkHyperTreeGridMapper.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
23#ifndef vtkHyperTreeGridMapper_h
24#define vtkHyperTreeGridMapper_h
25
26#include "vtkMapper.h"
27#include "vtkSetGet.h" // Get macro
28#include "vtkSmartPointer.h" // For vtkSmartPointer
29
30#include "vtkRenderingHyperTreeGridModule.h" // For export macro
31
32#include <set> // For std::set
33
34VTK_ABI_NAMESPACE_BEGIN
38class vtkPolyData;
40class vtkRenderWindow;
41class vtkRenderer;
42
43class VTKRENDERINGHYPERTREEGRID_EXPORT vtkHyperTreeGridMapper : public vtkMapper
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
62 using Superclass::SetInputConnection;
63 void SetInputDataObject(int port, vtkDataObject* input) override;
64 void SetInputDataObject(vtkDataObject* input) override;
66
68
74 double* GetBounds() override;
75 void GetBounds(double bounds[6]) override;
76 void GetBoundsComposite(double bounds[6]);
78
80
85 vtkGetMacro(UseAdaptiveDecimation, bool);
86 vtkSetMacro(UseAdaptiveDecimation, bool);
87 vtkBooleanMacro(UseAdaptiveDecimation, bool);
89
91
98
100
105 void SetBlockVisibility(unsigned int index, bool visible);
106 bool GetBlockVisibility(unsigned int index);
107 void RemoveBlockVisibility(unsigned int index);
110
117 void Render(vtkRenderer* ren, vtkActor* act) override;
118
124 int FillInputPortInformation(int port, vtkInformation* info) override;
125
126protected:
129
135
136 // In 2D mode, these variables control the mapper optimisations
137 bool UseAdaptiveDecimation = false;
138
139 // render the extracted surface,
140 // need to be created in device specific subclass
142
143 // Internal object to render
145
146private:
148 void operator=(const vtkHyperTreeGridMapper&) = delete;
149
150 std::set<unsigned int> BlocksShown;
151 std::set<unsigned int> BlocksHidden;
152
156 void ApplyBlockVisibilities();
157};
158
159VTK_ABI_NAMESPACE_END
160#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
Rendering attributes for a multi-block dataset.
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
map vtkHyperTreeGrid to graphics primitives
void SetInputDataObject(int port, vtkDataObject *input) override
Sets the data-object as an input on the given port index.
void SetInputDataObject(vtkDataObject *input) override
bool GetBlockVisibility(unsigned int index)
Set/get the visibility for a block given its flat index.
void SetBlockVisibility(unsigned int index, bool visible)
Set/get the visibility for a block given its flat index.
double * GetBounds() override
For this mapper, the bounds correspond to the output for the internal surface filter which may be res...
void RemoveBlockVisibility(unsigned int index)
Set/get the visibility for a block given its flat index.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *attributes)
Set/get the composite data set attributes.
vtkSmartPointer< vtkPolyDataMapper > Mapper
void GetBoundsComposite(double bounds[6])
For this mapper, the bounds correspond to the output for the internal surface filter which may be res...
void GetBounds(double bounds[6]) override
For this mapper, the bounds correspond to the output for the internal surface filter which may be res...
vtkCompositeDataDisplayAttributes * GetCompositeDataDisplayAttributes()
Set/get the composite data set attributes.
void Render(vtkRenderer *ren, vtkActor *act) override
Use the internal PolyData Mapper to do the rendering of the HTG transformed by the current SurfaceFil...
~vtkHyperTreeGridMapper() override
vtkSmartPointer< vtkCompositeDataSet > UpdateWithDecimation(vtkCompositeDataSet *htg, vtkRenderer *ren)
Generate a new composite were each leave is decimated if required.
static vtkHyperTreeGridMapper * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkCompositeDataSet > Input
void RemoveBlockVisibilities()
Set/get the visibility for a block given its flat index.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
abstract class specifies interface to map data to graphics primitives
Definition vtkMapper.h:137
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
create a window for renderers to draw into
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.