Refactor #31
refactor glutdevice and glutsensordevice
Status: | New | Start date: | 10/19/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | InputInterface | |||
Target version: | - |
Description
up to now, the switch between the glutdevice and the glutsensordevice has to be done in the application base using some non configurable predefined key.
One could refactor these both classes and extract a common glut Singleton, which uses the observer pattern to notify the input device instances.
Furthermore the glut sensor device could also provide the mouse axis and a configuration for a key, which switches between the sensor and the axis mode.
So you don't have to explicitly switch in the application base between these two devices, you just have to use the glutdevice just for the keys and the glutsensordevice for the axis and the sensors.
History
#1 Updated by sam g about 14 years ago
the tutorials need also to be changed:
- MedievalTown
- GoingImmersive
#2 Updated by sam g about 14 years ago
in general a change to a version without GLUT (the GlutMouseDevice uses the glut header which automatically links glut32) would be useful, e.g. for a QT or a native Application Base Version.
#4 Updated by sam g over 13 years ago
during the ticket #43 a general DesktopInputDevice was created, which is an abstraction around Mouse, Keyboard and SensorMouse. Using concrete implementations e.g. for glut or OpenSceneGraph the same input device can be used on different plattforms and environments.