27.04.2013 Views

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sound & Multimedia<br />

codes to an output stream.<br />

Chris Smith<br />

Q: Just wondering if <strong>Java</strong> has classes and methods supporting joysticks? Is<br />

there any sample code working with joysticks some where?<br />

Answer: Sure it does. It's part of the <strong>Java</strong> 3D API. There is an InputDevice interface.<br />

It is described as follows:<br />

"InputDevice is the interface through which <strong>Java</strong> 3D and <strong>Java</strong> 3D application<br />

programs communicate with a device driver. All input devices that <strong>Java</strong> 3D uses<br />

must implement the InputDevice interface and be registered with <strong>Java</strong> 3D via a call<br />

to PhysicalEnvironment.addInputDevice(InputDevice). An input device transfers<br />

information to the <strong>Java</strong> 3D implementation and <strong>Java</strong> 3D applications by writing<br />

transform information to sensors that the device driver has created and manages.<br />

The driver can update its sensor information each time the pollAndProcessInput<br />

method is called."<br />

The trick is finding a driver. :)<br />

http://sourceforge.net/projects/j3djoystick/<br />

http://www.j3d.org/utilities/sensors.html<br />

Jim S.<br />

Pick your topics, and we'll send you great deals, free<br />

information, and special offers by email from Focalex.<br />

IT Professional General Computer Design and Graphics Linux Freeware/Shareware<br />

Games Intranet Computer Hardware Web Design Computer Software<br />

UNIX Web Software Windows Software Personal Finance Programming Software<br />

<strong>Server</strong>s C/C++ Powerbuilder Perl XML<br />

<strong>Java</strong> SQL Design/Graphics Utilities Handhelds<br />

Get FREE STUFF, special offers and information on the <strong>Java</strong>, C/C++,<br />

SQL, XML and another languages programming topics YOU want to hear<br />

about delivered to your inbox!<br />

Unix, Windows Software/HardWare, Handhelds - just pick YOUR<br />

interests and start getting the stuff you want today. The best<br />

free info and deals on computers, software and much more by email.<br />

SUBSCRIBE for FREE HERE<br />

(c)1999, 2000, 2001. <strong>Java</strong>FAQ.nu. All rights reserved worldwide.<br />

This document is free for distribution, you can send it to everybody who is interested in <strong>Java</strong>.<br />

This document can not be changed, either in whole or in part<br />

without the express written permission of the publisher.<br />

All questions please mailto:info@javafaq.nu<br />

file:///F|/350_t/350_tips/sound_multimedia.htm (2 of 2) [2002-02-27 21:19:10]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!