VTK  9.4.20250102
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
24#ifndef vtkInteractorStyleTreeMapHover_h
25#define vtkInteractorStyleTreeMapHover_h
26
28#include "vtkViewsInfovisModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
32class vtkPoints;
33class vtkRenderer;
34class vtkTree;
38
39class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
52 vtkGetObjectMacro(Layout, vtkTreeMapLayout);
54
56
61 vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
63
65
68 vtkSetStringMacro(LabelField);
69 vtkGetStringMacro(LabelField);
71
73
77 void OnMouseMove() override;
78 void OnLeftButtonUp() override;
80
82
88
90
94 void SetHighLightColor(double r, double g, double b);
95
99 void SetSelectionLightColor(double r, double g, double b);
100
102
105 void SetHighLightWidth(double lw);
108
110
113 void SetSelectionWidth(double lw);
116
117protected:
120
121private:
123 void operator=(const vtkInteractorStyleTreeMapHover&) = delete;
124
125 // These methods are used internally
126 vtkIdType GetTreeMapIdAtPos(int x, int y);
127 void GetBoundingBoxForTreeMapItem(vtkIdType id, float* binfo);
128
129 vtkWorldPointPicker* Picker;
131 vtkActor* HighlightActor;
132 vtkActor* SelectionActor;
133 vtkPoints* HighlightPoints;
134 vtkPoints* SelectionPoints;
135 vtkTreeMapLayout* Layout;
136 vtkTreeMapToPolyData* TreeMapToPolyData;
137 char* LabelField;
138 vtkIdType CurrentSelectedId;
139};
140
141VTK_ABI_NAMESPACE_END
142#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
represent the vtkBalloonWidget
a simple class to control print indentation
Definition vtkIndent.h:108
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:139
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
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:155
find world x,y,z corresponding to display x,y,z
int vtkIdType
Definition vtkType.h:315