Last change
on this file since 6002 was
6002,
checked in by ldelgass, 9 years ago
|
Add 'select clear' protocol command, clear previous selection on 'select
feature...' command
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (C) 2015 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
6 | */ |
---|
7 | #ifndef GEOVIS_PICKER_H |
---|
8 | #define GEOVIS_PICKER_H |
---|
9 | |
---|
10 | #include <osgEarth/Picker> |
---|
11 | #include <osgEarth/ObjectIndex> |
---|
12 | |
---|
13 | namespace GeoVis { |
---|
14 | |
---|
15 | class Renderer; |
---|
16 | |
---|
17 | struct HoverCallback : public osgEarth::Picker::Callback { |
---|
18 | public: |
---|
19 | HoverCallback(Renderer *renderer); |
---|
20 | |
---|
21 | void onHit(osgEarth::ObjectID id); |
---|
22 | void onMiss(); |
---|
23 | bool accept(const osgGA::GUIEventAdapter& ea, const osgGA::GUIActionAdapter& aa); |
---|
24 | |
---|
25 | private: |
---|
26 | Renderer *_renderer; |
---|
27 | }; |
---|
28 | |
---|
29 | struct SelectCallback : public osgEarth::Picker::Callback { |
---|
30 | public: |
---|
31 | SelectCallback(Renderer *renderer); |
---|
32 | |
---|
33 | void onHit(osgEarth::ObjectID id); |
---|
34 | void onMiss(); |
---|
35 | bool accept(const osgGA::GUIEventAdapter& ea, const osgGA::GUIActionAdapter& aa); |
---|
36 | |
---|
37 | private: |
---|
38 | Renderer *_renderer; |
---|
39 | osgEarth::GeoPoint _pickPoint; |
---|
40 | }; |
---|
41 | |
---|
42 | struct DeleteCallback : public osgEarth::Picker::Callback { |
---|
43 | public: |
---|
44 | DeleteCallback(Renderer *renderer) : |
---|
45 | _renderer(renderer) |
---|
46 | {} |
---|
47 | |
---|
48 | void onHit(osgEarth::ObjectID id); |
---|
49 | |
---|
50 | private: |
---|
51 | Renderer *_renderer; |
---|
52 | }; |
---|
53 | |
---|
54 | extern void setHighlightByObjectID(osgEarth::ObjectID id); |
---|
55 | extern void clearHighlight(); |
---|
56 | |
---|
57 | } |
---|
58 | |
---|
59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.