Game Development Reference
In-Depth Information
To use the input device to drive a model requires the calibration
previously outlined. In this code segment we use the following variables to
define the rotation limits:
numerical value from the A/D conversion when the suit is at
minimum heading
AdminH
numerical minimum rotation value for the Euler angle
heading for the current object
minH
numerical value from the A/D conversion when the suit is at
minimum pitch
AdminP
numerical minimum rotation value for the Euler angle pitch
for the current object
minP
numerical value from the A/D conversion when the suit is at
minimum bank
AdminB
numerical minimum rotation value for the Euler angle bank
for the current object
minB
numerical value from the A/D conversion when the suit is at
maximum heading
AdmaxH
numerical maximum rotation value for the Euler angle
heading for the current object
maxH
the numerical value from the A/D conversion when the suit
is at maximum pitch
AdmaxP
numerical maximum rotation value for the Euler angle pitch
for the current object
maxP
the numerical value from the A/D conversion when the suit
is at maximum bank
AdmaxB
numerical maximum rotation value for the Euler angle bank
for the current object
maxB
lowest 4 bits A/D channel, highest 4 bits multiplexer
channel for heading
mcChannelH
lowest 4 bits A/D channel, highest 4 bits multiplexer
channel for pitch
mcChannelP
lowest 4 bits A/D channel, highest 4 bits multiplexer
channel for bank
mcChannelB
Using these values we can determine the current orientation by setting
the multiplexer and A/D channel. We then read the value from the current
channel. If the A/D minimum value is less than the maximum value, the
orientation will be given by first setting the limits to with bounds. Then the
current channel orientation is
Search Nedrilad ::




Custom Search