home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / msdos / raytrace / rayshade / src / sampling.h < prev    next >
C/C++ Source or Header  |  1992-04-30  |  2KB  |  56 lines

  1. /*
  2.  * sampling.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * $Id: sampling.h,v 4.0 91/07/17 14:32:01 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    sampling.h,v $
  19.  * Revision 4.0  91/07/17  14:32:01  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23. #ifndef SAMPLING_H
  24. #define SAMPLING_H
  25.  
  26. #if defined(__WATCOMC__) || defined(__BORLANDC__)
  27. #include <stdlib.h>
  28. #endif
  29.  
  30. /*
  31.  * # of subsamples to take within each of the totsamples slots when
  32.  * computing 'animated' bounding boxes.
  33.  */
  34. #define TIME_SUB_SAMPLES    10
  35.  
  36. typedef struct SampleInfo {
  37.     int    totsamples,    /* # of samples/pixel */
  38.         sidesamples,    /* sqrt(samples) */
  39.         gaussian,    /* gaussian filter? */
  40.         framenum,    /* current frame numer */
  41.         timemagic;    /* # of time samples per screen... */
  42.     Float    weight,        /* 1. / totsamples */
  43.         spacing,    /* 1. / sidesamples  */
  44.         filterwidth,    /* total width of filter */
  45.         filterdelta,    /* filterwidth * spacing */
  46.         **filter,    /* pixel filter, sidesamp by sidesamp */
  47.         starttime,    /* start time */
  48.         shutter;    /* length of time shutter is open */
  49. } SampleInfo;
  50.  
  51. extern SampleInfo Sampling;
  52.  
  53. extern void    SamplingSetOptions(), UnitCirclePoint();
  54.  
  55. #endif /* SAMPLING */
  56.