| 1 |
<HTML> |
|---|
| 2 |
<HEAD> |
|---|
| 3 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
|---|
| 4 |
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; IRIX64 6.4 IP30) [Netscape]"> |
|---|
| 5 |
<META NAME="Author" CONTENT="Allen Bierbaum"> |
|---|
| 6 |
<META NAME="Description" CONTENT="This file documents the use of input from the users perspective.It also doecuments the use of default devices."> |
|---|
| 7 |
<TITLE>User Input documentation</TITLE> |
|---|
| 8 |
<!-- SGI_COMMENT COSMOCREATE --> |
|---|
| 9 |
<!-- SGI_COMMENT VERSION NUMBER="1.0.2" --> |
|---|
| 10 |
</HEAD> |
|---|
| 11 |
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000"> |
|---|
| 12 |
User Input Documentation |
|---|
| 13 |
|
|---|
| 14 |
<P>This document explains how user input and default input devices are |
|---|
| 15 |
handled by the C2Library. |
|---|
| 16 |
<H3> |
|---|
| 17 |
<U>Requirements</U></H3> |
|---|
| 18 |
|
|---|
| 19 |
<H4> |
|---|
| 20 |
User must be able to</H4> |
|---|
| 21 |
|
|---|
| 22 |
<UL> |
|---|
| 23 |
<LI> |
|---|
| 24 |
Ask for head</LI> |
|---|
| 25 |
|
|---|
| 26 |
<LI> |
|---|
| 27 |
Ask for wand</LI> |
|---|
| 28 |
|
|---|
| 29 |
<LI> |
|---|
| 30 |
Ask for other default devices</LI> |
|---|
| 31 |
|
|---|
| 32 |
<LI> |
|---|
| 33 |
Ask for specific deviecs</LI> |
|---|
| 34 |
|
|---|
| 35 |
<LI> |
|---|
| 36 |
Query the device for its data</LI> |
|---|
| 37 |
</UL> |
|---|
| 38 |
The user will call a function like: |
|---|
| 39 |
|
|---|
| 40 |
<P>int index = GetDeviceIndex("Device Name"); |
|---|
| 41 |
|
|---|
| 42 |
<P>The user will actually get an int index that can be used to call: |
|---|
| 43 |
<MENU> |
|---|
| 44 |
<LI> |
|---|
| 45 |
GetPos(int index)</LI> |
|---|
| 46 |
|
|---|
| 47 |
<LI> |
|---|
| 48 |
GetAnalog(int index), etc.</LI> |
|---|
| 49 |
</MENU> |
|---|
| 50 |
Keyboard input: |
|---|
| 51 |
<UL> |
|---|
| 52 |
<LI> |
|---|
| 53 |
Should it always be active?</LI> |
|---|
| 54 |
|
|---|
| 55 |
<LI> |
|---|
| 56 |
How will applications exit when no keyboard is present?</LI> |
|---|
| 57 |
</UL> |
|---|
| 58 |
|
|---|
| 59 |
<H3> |
|---|
| 60 |
<U>Proxy Aliases</U></H3> |
|---|
| 61 |
These are proxy names alias other proxies. The config file has a proxyAlias |
|---|
| 62 |
chunk that defines an alias name to point to a proxy. These chunk |
|---|
| 63 |
sets up an array of indices to be used internally. |
|---|
| 64 |
|
|---|
| 65 |
<P>The chunk looks like this: |
|---|
| 66 |
<UL>proxyAlias |
|---|
| 67 |
<UL>aliasName string 1 |
|---|
| 68 |
# Name of the alias |
|---|
| 69 |
<BR>proxyPtr chunk 1 |
|---|
| 70 |
# Proxy to alias |
|---|
| 71 |
<BR>end</UL> |
|---|
| 72 |
</UL> |
|---|
| 73 |
<B><U>Standard Aliases:</U></B> These are suggested string aliases that |
|---|
| 74 |
should be used in all configs |
|---|
| 75 |
<UL> |
|---|
| 76 |
<LI> |
|---|
| 77 |
C2Head - A positional device for the users head</LI> |
|---|
| 78 |
|
|---|
| 79 |
<LI> |
|---|
| 80 |
C2Wand - A positional device for the user wand</LI> |
|---|
| 81 |
|
|---|
| 82 |
<LI> |
|---|
| 83 |
C2Glove - A glove device.</LI> |
|---|
| 84 |
|
|---|
| 85 |
<LI> |
|---|
| 86 |
C2Digital - A digital device</LI> |
|---|
| 87 |
|
|---|
| 88 |
<LI> |
|---|
| 89 |
C2Analog - An analog device</LI> |
|---|
| 90 |
|
|---|
| 91 |
<LI> |
|---|
| 92 |
C2Simulator - Positional device for controling simulator window</LI> |
|---|
| 93 |
</UL> |
|---|
| 94 |
These aliases anc then be used in the call to GetDeviceIndex("Device Name"). |
|---|
| 95 |
This call looks at the internal default device array. This array |
|---|
| 96 |
contains the indices of the real proxies. The function returns this |
|---|
| 97 |
proxy index. This ability can be used to write programs that can |
|---|
| 98 |
be reconfigured to use other devices without code changes. |
|---|
| 99 |
<BR> |
|---|
| 100 |
<H4> |
|---|
| 101 |
Run-Time changes</H4> |
|---|
| 102 |
To change the configuration of proxy aliases at run-time, a proxyAlias |
|---|
| 103 |
chunk needs to be sent to the inputManager. This will directly tell |
|---|
| 104 |
the input manager how to modify the alias array. |
|---|
| 105 |
<BR> |
|---|
| 106 |
<BR> |
|---|
| 107 |
</BODY> |
|---|
| 108 |
</HTML> |
|---|