00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SG_SCENE_PICKCALLBACK_HXX
00023 #define SG_SCENE_PICKCALLBACK_HXX
00024
00025 #include <simgear/structure/SGReferenced.hxx>
00026 #include <simgear/structure/SGSharedPtr.hxx>
00027 #include <simgear/math/SGMath.hxx>
00028
00029
00030
00031 class SGPickCallback : public SGReferenced {
00032 public:
00033 enum Priority {
00034 PriorityGUI = 0,
00035 PriorityPanel = 1,
00036 PriorityOther = 2
00037 };
00038
00039 struct Info {
00040 SGVec3d wgs84;
00041 SGVec3d local;
00042 };
00043
00044 SGPickCallback(Priority priority = PriorityOther) :
00045 _priority(priority)
00046 { }
00047
00048 virtual ~SGPickCallback() {}
00049 virtual bool buttonPressed(int button, const Info& info)
00050 { return false; }
00051 virtual void update(double dt)
00052 { }
00053 virtual void buttonReleased(void)
00054 { }
00055
00056 Priority getPriority() const
00057 { return _priority; }
00058
00059 private:
00060 Priority _priority;
00061 };
00062
00063 struct SGSceneryPick {
00064 SGPickCallback::Info info;
00065 SGSharedPtr<SGPickCallback> callback;
00066 };
00067
00068 #endif