i
i
i
i
i
i
i
i
478 17. Programming Input and Force Feedback
alent of the fabulously realistic visuals that even a modestly priced graphics
adapter can deliver. But in Section 17.5, we will offer some ideas as to how
you can, with a modest degree of electronic circuit design skills, start some
custom interactive experiments of your own.
From the software developer’s perspective, there are four strategies open
to us so that we can use other forms of input apart from the basic keyboard
and mouse. These are:
1. DirectX, which was previously introduced in the context of real-time
3D graphics and interactive multimedia. Another component of the
DirectX system, DirectInput, has been designed to meet the need that
we seek to address in this chapter. We will look at how it works in
Section 17.1.
2. Use a proprietary software development kit provided by the manufac-
turer of consoles and haptic devices. We shall comment specifically on
one these in Section 17.3.1 because it attempts to do for haptics what
OpenGL has done for graphics.
3. There is a class of software called middleware that delivers system in-
dependence by acting as a link between the hardware devices and the
application software. The middleware software often follows a client-
server model in which a server program communicates with the input
or sensing hardware, formats the data into a device-independent struc-
ture and sends it to a client program. The client program receives the
data, possibly from several servers, and presents it to the VR appli-
cation, again in a device-independent manner. Often the servers run
on independent host computers that are dedicated to data acquisition
from a single device. Communication between client and server is usu-
ally done via a local area network. We explore middleware in a little
more detail in Section 17.4.
4. Design your own custom interface and build your own hardware. This
is not as crazy as it seems, because haptics and force feedback are still
the subject of active R&D and there are no absolutes or universally
agreed standards. We shall look at an outline of how you might do this
and provide a simple but versatile software interface for custom input
devices in Section 17.5.
We begin this chapter by describing the most familiar way (on a Windows
PC) in which to program multi-faceted input and force feedback devices; that
is, using DirectInput.