VTK  9.0.1
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 -------------------------------------------------------------------------*/
40 #ifndef vtkInteractorStyleTreeMapHover_h
41 #define vtkInteractorStyleTreeMapHover_h
42 
44 #include "vtkViewsInfovisModule.h" // For export macro
45 
47 class vtkPoints;
48 class vtkRenderer;
49 class vtkTree;
50 class vtkTreeMapLayout;
53 
54 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
66  void SetLayout(vtkTreeMapLayout* layout);
67  vtkGetObjectMacro(Layout, vtkTreeMapLayout);
69 
71 
75  void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
76  vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
78 
80 
83  vtkSetStringMacro(LabelField);
84  vtkGetStringMacro(LabelField);
86 
88 
92  void OnMouseMove() override;
93  void OnLeftButtonUp() override;
95 
97 
100  void HighLightItem(vtkIdType id);
101  void HighLightCurrentSelectedItem();
103 
104  void SetInteractor(vtkRenderWindowInteractor* rwi) override;
105 
109  void SetHighLightColor(double r, double g, double b);
110 
114  void SetSelectionLightColor(double r, double g, double b);
115 
117 
120  void SetHighLightWidth(double lw);
121  double GetHighLightWidth();
123 
125 
128  void SetSelectionWidth(double lw);
129  double GetSelectionWidth();
131 
132 protected:
134  ~vtkInteractorStyleTreeMapHover() override;
135 
136 private:
138  void operator=(const vtkInteractorStyleTreeMapHover&) = delete;
139 
140  // These methods are used internally
141  vtkIdType GetTreeMapIdAtPos(int x, int y);
142  void GetBoundingBoxForTreeMapItem(vtkIdType id, float* binfo);
143 
144  vtkWorldPointPicker* Picker;
145  vtkBalloonRepresentation* Balloon;
146  vtkActor* HighlightActor;
147  vtkActor* SelectionActor;
148  vtkPoints* HighlightPoints;
149  vtkPoints* SelectionPoints;
150  vtkTreeMapLayout* Layout;
151  vtkTreeMapToPolyData* TreeMapToPolyData;
152  char* LabelField;
153  vtkIdType CurrentSelectedId;
154 };
155 
156 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkInteractorStyleImage::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleTreeMapHover
An interactor style for a tree map view.
Definition: vtkInteractorStyleTreeMapHover.h:54
vtkInteractorStyleImage.h
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkTreeMapToPolyData
converts a tree to a polygonal data representing a tree map
Definition: vtkTreeMapToPolyData.h:36
vtkWorldPointPicker
find world x,y,z corresponding to display x,y,z
Definition: vtkWorldPointPicker.h:44
vtkInteractorStyleImage
interactive manipulation of the camera specialized for images
Definition: vtkInteractorStyleImage.h:87
vtkInteractorStyleImage::New
static vtkInteractorStyleImage * New()
vtkInteractorStyle::SetInteractor
void SetInteractor(vtkRenderWindowInteractor *interactor) override
Set/Get the Interactor wrapper being controlled by this object.
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:54
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkInteractorStyleImage::OnLeftButtonUp
void OnLeftButtonUp() override
vtkBalloonRepresentation
represent the vtkBalloonWidget
Definition: vtkBalloonRepresentation.h:76
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkTreeMapLayout
layout a vtkTree into a tree map
Definition: vtkTreeMapLayout.h:51
vtkInteractorStyleImage::OnMouseMove
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.