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 -------------------------------------------------------------------------*/
37 #ifndef vtkInteractorStyleTreeMapHover_h
38 #define vtkInteractorStyleTreeMapHover_h
39 
40 #include "vtkViewsInfovisModule.h" // For export macro
42 
44 class vtkPoints;
45 class vtkRenderer;
46 class vtkTree;
47 class vtkTreeMapLayout;
50 
51 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleTreeMapHover : public vtkInteractorStyleImage
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
59 
63  void SetLayout(vtkTreeMapLayout* layout);
64  vtkGetObjectMacro(Layout, vtkTreeMapLayout);
66 
68 
72  void SetTreeMapToPolyData(vtkTreeMapToPolyData* filter);
73  vtkGetObjectMacro(TreeMapToPolyData, vtkTreeMapToPolyData);
75 
77 
80  vtkSetStringMacro(LabelField);
81  vtkGetStringMacro(LabelField);
83 
85 
89  void OnMouseMove() VTK_OVERRIDE;
90  void OnLeftButtonUp() VTK_OVERRIDE;
92 
94 
97  void HighLightItem(vtkIdType id);
98  void HighLightCurrentSelectedItem();
100 
101  void SetInteractor(vtkRenderWindowInteractor *rwi) VTK_OVERRIDE;
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);
118  double GetHighLightWidth();
120 
122 
125  void SetSelectionWidth(double lw);
126  double GetSelectionWidth();
128 
129 protected:
131  ~vtkInteractorStyleTreeMapHover() VTK_OVERRIDE;
132 
133 private:
134  vtkInteractorStyleTreeMapHover(const vtkInteractorStyleTreeMapHover&) VTK_DELETE_FUNCTION;
135  void operator=(const vtkInteractorStyleTreeMapHover&) VTK_DELETE_FUNCTION;
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;
142  vtkBalloonRepresentation* Balloon;
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:51
abstract specification for renderers
Definition: vtkRenderer.h:63
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:39
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:60
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:39