VTK  9.0.1
vtkInteractorStyleAreaSelectHover.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleAreaSelectHover.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 vtkInteractorStyleAreaSelectHover_h
35 #define vtkInteractorStyleAreaSelectHover_h
36 
38 #include "vtkViewsInfovisModule.h" // For export macro
39 
40 class vtkAreaLayout;
42 class vtkPoints;
43 class vtkRenderer;
44 class vtkTree;
46 class vtkPolyData;
47 
48 class VTKVIEWSINFOVIS_EXPORT vtkInteractorStyleAreaSelectHover
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
61  void SetLayout(vtkAreaLayout* layout);
62  vtkGetObjectMacro(Layout, vtkAreaLayout);
64 
66 
69  vtkSetStringMacro(LabelField);
70  vtkGetStringMacro(LabelField);
72 
74 
78  vtkSetMacro(UseRectangularCoordinates, bool);
79  vtkGetMacro(UseRectangularCoordinates, bool);
80  vtkBooleanMacro(UseRectangularCoordinates, bool);
82 
87  void OnMouseMove() override;
88 
93 
97  void SetHighLightColor(double r, double g, double b);
98 
100 
103  void SetHighLightWidth(double lw);
106 
110  vtkIdType GetIdAtPos(int x, int y);
111 
112 protected:
115 
116 private:
118  void operator=(const vtkInteractorStyleAreaSelectHover&) = delete;
119 
120  // These methods are used internally
121  void GetBoundingAreaForItem(vtkIdType id, float* sinfo);
122 
123  vtkWorldPointPicker* Picker;
124  vtkBalloonRepresentation* Balloon;
125  vtkPolyData* HighlightData;
126  vtkActor* HighlightActor;
127  vtkAreaLayout* Layout;
128  char* LabelField;
129  bool UseRectangularCoordinates;
130 };
131 
132 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:34
vtkInteractorStyleAreaSelectHover::New
static vtkInteractorStyleAreaSelectHover * New()
vtkInteractorStyleAreaSelectHover
An interactor style for an area tree view.
Definition: vtkInteractorStyleAreaSelectHover.h:50
vtkInteractorStyleAreaSelectHover::GetHighLightWidth
double GetHighLightWidth()
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkWorldPointPicker
find world x,y,z corresponding to display x,y,z
Definition: vtkWorldPointPicker.h:39
vtkInteractorStyleAreaSelectHover::SetHighLightColor
void SetHighLightColor(double r, double g, double b)
Set the color used to highlight the hovered vertex.
vtkInteractorStyleRubberBand2D
A rubber band interactor for a 2D view.
Definition: vtkInteractorStyleRubberBand2D.h:49
vtkInteractorStyleAreaSelectHover::SetInteractor
void SetInteractor(vtkRenderWindowInteractor *rwi) override
Set the interactor that this interactor style works with.
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:55
vtkInteractorStyleAreaSelectHover::vtkInteractorStyleAreaSelectHover
vtkInteractorStyleAreaSelectHover()
vtkInteractorStyleAreaSelectHover::SetHighLightWidth
void SetHighLightWidth(double lw)
The width of the line around the hovered vertex.
vtkInteractorStyleAreaSelectHover::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleRubberBand2D.h
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkInteractorStyleAreaSelectHover::~vtkInteractorStyleAreaSelectHover
~vtkInteractorStyleAreaSelectHover() override
vtkInteractorStyleAreaSelectHover::OnMouseMove
void OnMouseMove() override
Overridden from vtkInteractorStyleImage to provide the desired interaction behavior.
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:74
vtkBalloonRepresentation
represent the vtkBalloonWidget
Definition: vtkBalloonRepresentation.h:77
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:59
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkAreaLayout
layout a vtkTree into a tree map
Definition: vtkAreaLayout.h:47
vtkInteractorStyleAreaSelectHover::SetLayout
void SetLayout(vtkAreaLayout *layout)
Must be set to the vtkAreaLayout used to compute the bounds of each vertex.
vtkInteractorStyleAreaSelectHover::GetIdAtPos
vtkIdType GetIdAtPos(int x, int y)
Obtain the tree vertex id at the position specified.