VTK
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 -------------------------------------------------------------------------*/
34 #ifndef vtkInteractorStyleTreeMapHover_h
35 #define vtkInteractorStyleTreeMapHover_h
36 
37 #include "vtkViewsInfovisModule.h" // For export macro
39 
41 class vtkPoints;
42 class vtkRenderer;
43 class vtkTree;
44 class vtkTreeMapLayout;
47 
48 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54 
56 
60  void SetLayout(vtkTreeMapLayout* layout);
61  vtkGetObjectMacro(Layout, vtkTreeMapLayout);
63 
65 
69  void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
70  vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
72 
74 
77  vtkSetStringMacro(LabelField);
78  vtkGetStringMacro(LabelField);
80 
82 
86  void OnMouseMove() VTK_OVERRIDE;
87  void OnLeftButtonUp() VTK_OVERRIDE;
89 
91 
94  void HighLightItem(vtkIdType id);
95  void HighLightCurrentSelectedItem();
97 
98  void SetInteractor(vtkRenderWindowInteractor *rwi) VTK_OVERRIDE;
99 
103  void SetHighLightColor(double r, double g, double b);
104 
108  void SetSelectionLightColor(double r, double g, double b);
109 
111 
114  void SetHighLightWidth(double lw);
115  double GetHighLightWidth();
117 
119 
122  void SetSelectionWidth(double lw);
123  double GetSelectionWidth();
125 
126 protected:
128  ~vtkInteractorStyleTreeMapHover() VTK_OVERRIDE;
129 
130 private:
132  void operator=(const vtkInteractorStyleTreeMapHover&) VTK_DELETE_FUNCTION;
133 
134  // These methods are used internally
135  vtkIdType GetTreeMapIdAtPos(int x, int y);
136  void GetBoundingBoxForTreeMapItem(vtkIdType id, float *binfo);
137 
138  vtkWorldPointPicker* Picker;
139  vtkBalloonRepresentation* Balloon;
140  vtkActor *HighlightActor;
141  vtkActor *SelectionActor;
142  vtkPoints *HighlightPoints;
143  vtkPoints *SelectionPoints;
144  vtkTreeMapLayout* Layout;
145  vtkTreeMapToPolyData* TreeMapToPolyData;
146  char *LabelField;
147  vtkIdType CurrentSelectedId;
148 };
149 
150 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
abstract specification for renderers
Definition: vtkRenderer.h:57
layout a vtkTree into a tree map
int vtkIdType
Definition: vtkType.h:345
static vtkInteractorStyleImage * New()
interactive manipulation of the camera specialized for images
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
represent the vtkBalloonWidget
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
converts a tree to a polygonal data representing a tree map
A rooted tree data structure.
Definition: vtkTree.h:54
find world x,y,z corresponding to display x,y,z
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
An interactor style for a tree map view.
represent and manipulate 3D points
Definition: vtkPoints.h:33