This is a inputdevice driver for FreeWRL, based on FreeWRL's "/tmp/inpdev" joystick input interface and white_dune's inputdevice mechanism.
Currently supported devices are:
6D joystick devices (e.g. Logitech Wingman Rumblepad)
supported by the Linux joystick interface
supported by libsball (libsball is software developed by John E. Stone)
Ascension Flock of Birds magnetic headtracker (RS232 master configuration)
supported by a driver based on sourcecode from Kevin Meinert/VRJuggler
Any device supported by the X11 Xinput protocol
supported by the Xi library
MacOSX USB joystick
supported by code from the SDL library (by Sam Lantinga/Max Horn)
Note that FreeWRL version 0.40_pre1 do not support the "/tmp/inpdev"
mechanism properly 8-(
This version been tested with FreeWRL V1.07
If you need LabTec Spaceball support, install libsball first and don't forget to make the headerfile sball.h visible to the compiler (e.g. in /usr/local/include).
On MacOSX you may wish to avoid the Xi inputdevice driver, which requires X11 for Mac OS X (http://www.apple.com/macosx/x11/), use "sh build_MacOSX.sh".
If you have a rpm (Redhat Package Manager) based system, you can build a rpm package with
You can then install the binary package with a command like
rpm -i /usr/src/RPM/RPMS/*/FreeWRLduneInputDevice-*.rpm
Select the right commandline parameters for your inputdevice and start the program. Then Load a VRML/X3D file into FreeWRL and press "f" for the "joystick fly mode".
With commandline parameters, you can select the device, assign a scale for the axes, swap axes, swap axesdirections, deal with axes that do not set back to zero if you release the device and set a zerorange (usefull for learning to work with a spaceball or usefull to deal with devices, that do not set back exactly to zero if you release the device (e.g. joysticks with mechanical problems)).
Take a look at the directory "commandline_examples", if there is already a example for your inputdevice.
E.g. if you have a Logitech Wingman Rumblepad under Linux, you can try the file commandline_examples/wingmanrumblepad.sh
FreeWRLduneInputDevice -joystick /dev/input/js0 -x=0 -y=1 -z=-4 \
-xrot=6 -yrot=-3 -zrot=5
In this example, the first joystick axis (number 0) is assigned to the VRML x-axis, the second joystick axis (number 1) is assigned to the VRML y-axis and the fourth joystick axis (number 4) has directions swapped and is assigned to the VRML z-axis and so on.
For more information about commandline paramaters, see the manpage. If the manpage is not installed yet, you can view it with the command:
nroff -man FreeWRLduneInputDevice.1 | more
on puristic GNU systems, use something like
groff -Tascii -man FreeWRLduneInputDevice.1 | more
- Copyright (C) 1999 FreeWRL/John Stewart and others
- Copyright (C) 2000 dune/Stephen F. White and others
- Copyright (C) 2003 J. "MUFTI" Scheurich *
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- (C) Copyright 1998-2000 VR Juggler/Kevin Meinert and others *
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
SDL - Simple DirectMedia Layer
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/* SDL joystick driver for Darwin / MacOS X, based on the IOKit HID API */ /* Written 2001 by Max Horn */
For more information about the GNU General Public License, see the file COPYING
If you inspect the source of this program, you will see a lot of things,
which are not really needed.
A lot of things are only here as supporting files, so the files starting with "InputDevice" can be copied from white_dune unchanged:
If the input device driver of white_dune will be updated, it is very easy to update this input device driver of FreeWRL
This version contain the files of white_dune-0.27beta149 and has been tested with FreeWRL V1.07
Version 1.9 has reduced the possible navigationmodes to "hover" and include a usleep call to to improve FreeWRL performance.