VTK  9.7.1
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 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkHyperTreeGrid;
38 class vtkPolyData;
39 class vtkPolyDataMapper;
40 class vtkRenderWindow;
41 class vtkRenderer;
42 
43 class VTKRENDERINGHYPERTREEGRID_EXPORT vtkHyperTreeGridMapper : public vtkMapper
44 {
45 public:
46  static vtkHyperTreeGridMapper* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
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 
95  void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes* attributes);
96  vtkCompositeDataDisplayAttributes* GetCompositeDataDisplayAttributes();
98 
100 
105  void SetBlockVisibility(unsigned int index, bool visible);
106  bool GetBlockVisibility(unsigned int index);
107  void RemoveBlockVisibility(unsigned int index);
108  void RemoveBlockVisibilities();
110 
117  void Render(vtkRenderer* ren, vtkActor* act) override;
118 
124  int FillInputPortInformation(int port, vtkInformation* info) override;
125 
126 protected:
128  ~vtkHyperTreeGridMapper() override;
129 
133  vtkSmartPointer<vtkCompositeDataSet> UpdateWithDecimation(
134  vtkCompositeDataSet* htg, vtkRenderer* ren);
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 
146 private:
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 
159 VTK_ABI_NAMESPACE_END
160 #endif
vtkSmartPointer< vtkPolyDataMapper > Mapper
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
Store vtkAlgorithm input/output information.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Rendering attributes for a multi-block dataset.
abstract specification for renderers
Definition: vtkRenderer.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
map vtkHyperTreeGrid to graphics primitives
virtual void SetInputDataObject(int port, vtkDataObject *data)
Sets the data-object as an input on the given port index.
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
map vtkPolyData to graphics primitives
create a window for renderers to draw into
static vtkAlgorithm * New()
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
general representation of visualization data
Definition: vtkDataObject.h:55
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.
vtkSmartPointer< vtkCompositeDataSet > Input