VTK  9.2.6
vtkInteractorStyleTreeMapHover.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkInteractorStyleTreeMapHover.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
37#ifndef vtkInteractorStyleTreeMapHover_h
38#define vtkInteractorStyleTreeMapHover_h
39
41#include "vtkViewsInfovisModule.h" // For export macro
42
44class vtkPoints;
45class vtkRenderer;
46class vtkTree;
50
51class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
64 vtkGetObjectMacro(Layout, vtkTreeMapLayout);
66
68
73 vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
75
77
80 vtkSetStringMacro(LabelField);
81 vtkGetStringMacro(LabelField);
83
85
89 void OnMouseMove() override;
90 void OnLeftButtonUp() override;
92
94
100
102
106 void SetHighLightColor(double r, double g, double b);
107
111 void SetSelectionLightColor(double r, double g, double b);
112
114
117 void SetHighLightWidth(double lw);
120
122
125 void SetSelectionWidth(double lw);
128
129protected:
132
133private:
135 void operator=(const vtkInteractorStyleTreeMapHover&) = delete;
136
137 // These methods are used internally
138 vtkIdType GetTreeMapIdAtPos(int x, int y);
139 void GetBoundingBoxForTreeMapItem(vtkIdType id, float* binfo);
140
141 vtkWorldPointPicker* Picker;
143 vtkActor* HighlightActor;
144 vtkActor* SelectionActor;
145 vtkPoints* HighlightPoints;
146 vtkPoints* SelectionPoints;
147 vtkTreeMapLayout* Layout;
148 vtkTreeMapToPolyData* TreeMapToPolyData;
149 char* LabelField;
150 vtkIdType CurrentSelectedId;
151};
152
153#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:46
represent the vtkBalloonWidget
a simple class to control print indentation
Definition vtkIndent.h:34
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:34
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
Definition vtkRenderer.h:67
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:55
find world x,y,z corresponding to display x,y,z
int vtkIdType
Definition vtkType.h:332