00001 00006 /* 00007 * PROGRAM NAME: sh 00008 * 00009 * (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES 00010 * CORPORATION 12/1/2001. ALL RIGHTS RESERVED. 00011 * 00012 * Please refer to the LICENSE file in the top directory 00013 * 00014 * author: Mike Henderson mhender@watson.ibm.com 00015 */ 00016 00017 static char *id="@(#) $Id: shgetz.c,v 1.2 2006/08/17 19:28:17 mhender Exp $"; 00018 00019 #include <shInternal.h> 00020 00028 void shgetz(int *ipix,int *jpix, float *zz) 00029 { 00030 int index; 00031 00032 /* Return the z-buffer. */ 00033 00034 *zz=0.; 00035 if(*ipix<0||*jpix<0)return; 00036 if(*ipix>=shIMax||*jpix>=shJMax)return; 00037 00038 index=(*ipix)+shIMax*(*jpix); 00039 00040 *zz=shZBuffer[index]; 00041 return; 00042 }