Last change
on this file since 6716 was
6281,
checked in by ldelgass, 8 years ago
|
Update select protocol response to use add|delete|set sub-command
|
-
Property svn:eol-style set to
native
|
File size:
1.3 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 | float _x, _y; |
---|
40 | bool _modifier; |
---|
41 | osgEarth::GeoPoint _pickPoint; |
---|
42 | }; |
---|
43 | |
---|
44 | struct DeleteCallback : public osgEarth::Picker::Callback { |
---|
45 | public: |
---|
46 | DeleteCallback(Renderer *renderer) : |
---|
47 | _renderer(renderer) |
---|
48 | {} |
---|
49 | |
---|
50 | void onHit(osgEarth::ObjectID id); |
---|
51 | |
---|
52 | private: |
---|
53 | Renderer *_renderer; |
---|
54 | }; |
---|
55 | |
---|
56 | extern void setHighlightByObjectID(osgEarth::ObjectID id); |
---|
57 | extern void clearHighlight(); |
---|
58 | |
---|
59 | } |
---|
60 | |
---|
61 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.