SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

What is this:

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

LabTec Spaceball

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)

Installation

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).

./configure
make

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

cd packager/rpm
sh mkpg.sh

You can then install the binary package with a command like

rpm -i /usr/src/RPM/RPMS/*/FreeWRLduneInputDevice-*.rpm

Running the program:

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

Copyrights for different parts/files of the program:

  • 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

Sam Lantinga
slouken@libsdl.org

/* 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

Design principle:

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:

InputDevice.cpp
InputDevice.h
InputDeviceCommandline.cpp
Aflock.cpp
Aflock.h

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.

MUFTI (mufti@csv.ica.uni-stuttgart.de)


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.