Commit Graph

30 Commits

Author SHA1 Message Date
Robert Osfield
d5b615a4e1 Added osgGA::GUIEventAdapter* returns from various EventQueue event generation methods.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14868 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 11:33:04 +00:00
Robert Osfield
bb637e73f3 Fixed typo.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14680 16af8721-9629-0410-8352-f15c8da7e697
2015-02-04 15:11:00 +00:00
Robert Osfield
4a660f6266 Introduce new osgGA::Event and osgGA::EventHandler base classes that the old GUIEventAdapter and GUIEventHandler now subclass from.
The new osgGA::Event is written to support more generic events than the original GUIEventAdapter which are written for keyboard and mouse events.
2013-10-25 14:54:15 +00:00
Robert Osfield
fb3178106a Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity.
The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
2013-05-24 09:35:58 +00:00
Robert Osfield
668d351765 Introduced new scheme for handling mouse events with osgViewer. The new scheme enables robust event handling even when using distortion correction render to texture Cameras. 2013-05-03 19:26:27 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
85bce8b8ad From Stephan Huber, "attached you'll find a first version of multi-touch-support for OS X (>=
10.6), which will forward all multi-touch events from a trackpad to the
corresponding osgGA-event-structures.

The support is switched off per default, but you can enable multi-touch
support via a new flag for GraphicsWindowCocoa::WindowData or directly
via the GraphicsWindowCocoa-class.

After switching multi-touch-support on, all mouse-events from the
trackpad get ignored, otherwise you'll have multiple events for the same
pointer which is very confusing (as the trackpad reports absolute
movement, and as a mouse relative movement).

I think this is not a problem, as multi-touch-input is a completely
different beast as a mouse, so you'll have to code your own
event-handlers anyway.

While coding this stuff, I asked myself if we should refactor
GUIEventAdapter/EventQueue and assign a specific event-type for
touch-input instead of using PUSH/DRAG/RELEASE. This will make it
clearer how to use the code, but will break the mouse-emulation for the
first touch-point and with that all existing manipulators. What do you
think? I am happy to code the proposed changes.

Additionally I created a small (and ugly) example osgmultitouch which
makes use of the osgGA::MultiTouchTrackballManipulator, shows all
touch-points on a HUD and demonstrates how to get the touchpoints from
an osgGA::GUIEventAdapter.

There's even a small example video here: http://vimeo.com/31611842"
2012-02-03 14:25:08 +00:00
Robert Osfield
0329ca5cea Improved handling of resetting of the EventQueue::startTick(). 2011-11-04 12:45:32 +00:00
Robert Osfield
5b3eed5dce Fixed issue with events having a negative delta of time between them. 2011-06-14 12:44:44 +00:00
Robert Osfield
67ae23f2cf From Alexander Sinditskiy, "reason of this changes described in http://forum.openscenegraph.org/viewtopic.php?t=7596
and another problem is:
example osgkeyboard is not work (keys not highlight) if user have 2 keyboard layout native and english and current user layout is native

I try to explain my changes

we need something that is identify key without modifier keys and layout  -> this is UnmodifedKey

I think osg must have its own UnmodifiedKeys table. Code must be run same on different platforms. This can de guaranteed by UnmodifiedKeys table.

Mikhail Izmestev helped me. He implemented VirtualKey changes in GraphicsWindowX11"
2011-01-27 16:23:48 +00:00
Robert Osfield
e36c4d3a3b From Stephan Huber, "attached you'll find a proposal for handling multi-touch-events with
osgGA. My approach is to bundle all touchpoints into one custom data
structure which is attached to an GUIEventAdapter.

The current approach simulates a moving mouse for the first touch-point,
so basic manipulators do work, sort of.

I created a MultiTouchTrackballManipulator-class, one touch-point does
rotate the view, two touch-points pan and zoom the view as known from
the iphone or other similar multi-touch-devices. A double-tap (similar
to a double-click) resets the manipulator to its home-position.

The multi-touch-trackball-implementation is not the best, see it as a
first starting point. (there's a demo-video at http://vimeo.com/15017377 )"
2010-11-22 17:30:44 +00:00
Robert Osfield
e09e07d45b Added support for assigning GraphicsContext to individual GUIEventAdapter events,
and use of this within osgViewer::View to better track the sources of events.
2008-06-02 17:34:47 +00:00
Robert Osfield
76e0198007 From Philipp Machler, "We have extended the support for Wacom Tablet devices:
- Mac OS X
  - not only pressure, but tilt and z-rotation is supported now
"
2008-04-11 13:28:09 +00:00
Robert Osfield
f4afa427a7 From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Robert Osfield
6831940851 Added setCurrentEventState method 2007-07-13 11:31:56 +00:00
Robert Osfield
e3747b1004 From Rafa Giatan and Robert Osfield, added support for User defined events, by adding
UserData to Events.
2007-05-19 13:39:55 +00:00
Robert Osfield
16d1c00a3d Changed the return types of makeCurrent to bool, and added a bool GraphicsContext::releaseContext method
along with implementations in osgViewer.
2007-01-08 19:29:59 +00:00
Robert Osfield
7155f7d1b0 Various work on osgViewer library, including warp point and graphics window resize support 2007-01-01 18:20:10 +00:00
Robert Osfield
84d22f9999 Added new adapter methods to EventQueue to allow the time value of the
event to be specified.
2006-12-26 17:37:58 +00:00
Robert Osfield
2255771b74 Further work osgViewer::Viewer and related classes. 2006-12-20 21:13:29 +00:00
Robert Osfield
c24289315a Fixed comment 2006-11-15 20:24:09 +00:00
Robert Osfield
5c0eb0b013 Added bare bones osgGA::SimpleViewer class to help simplify OSG setup when embedding the OSG
into existing GUI applications, and for one one a single camera, single window is required.
2006-09-25 16:25:53 +00:00
Robert Osfield
6f23173c05 Added comments on the meaning of button value 2006-08-21 20:29:32 +00:00
Robert Osfield
c0c5e73ff9 From Michael Polak, double click fixes/additions 2006-07-27 12:32:40 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
e7d9e91525 From Stephan Huber,
"attached you'll find some modifications to Producer, osgGA and
osgProducer to enable Mac OS X support for

+ scrollwheels,
+ mightymouse-srollballs
+ new tracking-pads with scroll feature
+ tablet-support (pressure, proximity and pointertype) (Wacom only tested)

I think there was a bug in the windows-implementation of scroll-wheel
support (wrong order of ScrollingMotion-enum, casting problem) which is
fixed now.

The scrollwheel-code is a bit klunky across platforms, some devices on
OS X can report an absolute delta in pixel-coordinates not only the
direction, so for now there is scrollingMotion (which describes the
direction) and scrolldeltax and scrolldeltay. I decided to leave the
scrollingmotion-stuff to not break old code relying on this."
2006-07-04 14:18:44 +00:00
Robert Osfield
85edf40fcb Added createEvent() convinience method. 2006-03-15 15:49:21 +00:00
Robert Osfield
d43dbaeadd Build fixes 2006-03-14 13:18:21 +00:00
Robert Osfield
1a16d6d6b0 Added an EventQueue directly into osgProducer::Viewer. 2006-03-13 13:19:37 +00:00
Robert Osfield
fa5ff9d169 Added EventQueue. 2006-03-08 15:40:02 +00:00