###############################################################################
# #
# Copyright © 1989-1991 by Artificial Horizons®, Inc. All rights reserved. #
# #
# This material constitutes the trade secrets and confidential, #
# proprietary information of Bruce Factor and Curtis Priem, and is #
# under license to Artificial Horizons, Inc. The material is not #
# to be disclosed, reproduced, copied, or used in any manner not #
# permitted under license from Artificial Horizons, Inc. For more #
# information email "ahi-interest@ahi.com". #
# #
###############################################################################
ATL_SHADING(3T) AVIATOR TERRAIN LIBRARY FUNCTIONS ATL_SHADING(3T)
NAME
atl_shading - generate shading in Aviator terrain data files
SYNOPSIS
#include <atl.h>
int atl_shading(long_00, lat_00, long_0c, lat_0c,
long_r0, lat_r0, long_rc, lat_rc,
color, time_of_day)
double long_00, lat_00, long_0c, lat_0c;
double long_r0, lat_r0, long_rc, lat_rc;
struct atl_color_struct *color;
double time_of_day;
DESCRIPTION
atl_shading() changes or creates the shading of the terrain in the
data files used by Aviator. Shading gives visual details about the
slopes of the terrain. The input elevation data files have filenames
of ???_??? and the intermediate input/output color data files have
filenames of ???_???.c32 where ? is a number.
long_00 and lat_00, long_0c and lat_0c, long_r0 and lat_r0, and
long_rc and lat_rc represent the longitudes and latitudes of the
locations on the globe of the area bounding box where the shading is
to be done. All longitudes are measured in degrees from the Meridian
of Greenwich and all latitudes are measured in degrees from the Equator.
atl_shading() should be used when no shaded color data of the terrain
is available or when color data needs to be shaded. atl_shading()
uses diffused reflection shading with the light source being the sun.
The sun's location is described by time_of_day in military time (eg.
16.25 = 4:15pm).
If no color information is available for a location in the data file,
a diffused color is generated from the dark color[0] and light
color[1]. color[] is specified in linear color space.
atl_shading() can also be used to shade nonshaded color data of the
terrain. If there is color information for a location then normal
diffused reflection is done on that color. color[0] and color[1] are
ignored.
atl_shading() should be called once after the data files have been
generated by one or more calls to atl_elevation() and/or atl_color()
and before atl_color_post().
RETURN VALUES
atl_shading() returns:
0 on success.
-1 on failure.
FILES
/usr/games/aviator/atl/h/atl.h
/usr/games/aviator/atl/lib/libatl.a
/usr/games/aviator/passwords
/usr/games/aviator/terrain/???_???
/usr/games/aviator/terrain/???_???.c32
ENVIRONMENT
The environment variable AVIATOR_HOME points to the home directory for
aviator, if it is other than /usr/games/aviator. AVIATOR_PASSWORDS
points to the file that contains the password file passwords, if it is
other than /usr/games/aviator/passwords or ${AVIATOR_HOME}/passwords.
passwords contains the password needed to use atl_color(). The
following are examples of how to set AVIATOR_HOME and
AVIATOR_PASSWORDS:
setenv AVIATOR_HOME /home/bigdisk/aviator
setenv AVIATOR_PASSWORDS /home/bigdisk/aviator/passwords
SEE ALSO
atl_color(3T), atl_color_post(3T), atl_elevation(3T), passwords(5A)
ATL Release 1.8 Last change: 25 December 1991