[glideplan_swproj] Mouse picking proposal

  • From: Cestmir Houska <czestmyr@xxxxxxxxx>
  • To: glideplan_swproj@xxxxxxxxxxxxx
  • Date: Mon, 5 Mar 2012 22:55:37 +0100

Hi,

Before the weekend, we sat down with Bohdan and created the following
idea for mouse picking subsystem:

https://github.com/updraft/updraft/wiki/Mouse-Picking-Interface

Basically, we propose to create a MapObject class that will represent
a pickable object in the map. The mouse-click GUI handler will then
pick all the intersected nodes and for each node (taking the foremost
nodes first) find the nearest parent, that has a MapObject associated
with it, in the OSG hierarchy. All plugins will then be notified by
calling their HandleEvent function with the corresponding MapObject
and other data as arguments - we don't think that there will ever be
so many plugins or simultaneously picked MapObjects that this "notify
everyone" approach could cause a significant slow-down.

The only thing that we are unsure about are the context menus. Either
we can have a single context menu and dynamically re-build it every
time it is required or we can have a context menu for every object
that will ever need to use one. In the current core interface, we are
using the first approach and we chose it in our proposal as well.

Cestmir & Bohdan

To visit archive or unsubscribe, follow:
//www.freelists.org/list/glideplan_swproj

Other related posts:

  • » [glideplan_swproj] Mouse picking proposal - Cestmir Houska