VTK  9.3.0
vtkInteractorStyleTreeMapHover.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21#ifndef vtkInteractorStyleTreeMapHover_h
22#define vtkInteractorStyleTreeMapHover_h
23
25#include "vtkViewsInfovisModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
29class vtkPoints;
30class vtkRenderer;
31class vtkTree;
35
36class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
49 vtkGetObjectMacro(Layout, vtkTreeMapLayout);
51
53
58 vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
60
62
65 vtkSetStringMacro(LabelField);
66 vtkGetStringMacro(LabelField);
68
70
74 void OnMouseMove() override;
75 void OnLeftButtonUp() override;
77
79
85
87
91 void SetHighLightColor(double r, double g, double b);
92
96 void SetSelectionLightColor(double r, double g, double b);
97
99
102 void SetHighLightWidth(double lw);
105
107
110 void SetSelectionWidth(double lw);
113
114protected:
117
118private:
120 void operator=(const vtkInteractorStyleTreeMapHover&) = delete;
121
122 // These methods are used internally
123 vtkIdType GetTreeMapIdAtPos(int x, int y);
124 void GetBoundingBoxForTreeMapItem(vtkIdType id, float* binfo);
125
126 vtkWorldPointPicker* Picker;
128 vtkActor* HighlightActor;
129 vtkActor* SelectionActor;
130 vtkPoints* HighlightPoints;
131 vtkPoints* SelectionPoints;
132 vtkTreeMapLayout* Layout;
133 vtkTreeMapToPolyData* TreeMapToPolyData;
134 char* LabelField;
135 vtkIdType CurrentSelectedId;
136};
137
138VTK_ABI_NAMESPACE_END
139#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
represent the vtkBalloonWidget
a simple class to control print indentation
Definition vtkIndent.h:29
interactive manipulation of the camera specialized for images
An interactor style for a tree map view.
void SetSelectionWidth(double lw)
The width of the line around the selected vertex.
void SetSelectionLightColor(double r, double g, double b)
Set the color used to highlight the selected vertex.
void OnLeftButtonUp() override
Overridden from vtkInteractorStyleImage to provide the desired interaction behavior.
void SetHighLightWidth(double lw)
The width of the line around the hovered vertex.
static vtkInteractorStyleTreeMapHover * New()
void OnMouseMove() override
Overridden from vtkInteractorStyleImage to provide the desired interaction behavior.
~vtkInteractorStyleTreeMapHover() override
double GetHighLightWidth()
The width of the line around the hovered vertex.
void SetLayout(vtkTreeMapLayout *layout)
Must be set to the vtkTreeMapLayout used to compute the bounds of each vertex for the tree map.
void SetTreeMapToPolyData(vtkTreeMapToPolyData *filter)
Must be set to the vtkTreeMapToPolyData used to convert the tree map into polydata.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetHighLightColor(double r, double g, double b)
Set the color used to highlight the hovered vertex.
void SetInteractor(vtkRenderWindowInteractor *rwi) override
Set/Get the Interactor wrapper being controlled by this object.
void HighLightItem(vtkIdType id)
Highlights a specific vertex.
void HighLightCurrentSelectedItem()
Highlights a specific vertex.
double GetSelectionWidth()
The width of the line around the selected vertex.
represent and manipulate 3D points
Definition vtkPoints.h:29
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
Definition vtkRenderer.h:59
layout a vtkTree into a tree map
converts a tree to a polygonal data representing a tree map
A rooted tree data structure.
Definition vtkTree.h:46
find world x,y,z corresponding to display x,y,z
int vtkIdType
Definition vtkType.h:315