home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / povsrc.sit / SOURCE / TEXTURE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-03  |  1.8 KB  |  53 lines

  1. /****************************************************************************
  2. *                   texture.h
  3. *
  4. *  This file contains defines and variables for the txt*.c files
  5. *  
  6. *
  7. *  from Persistence of Vision Raytracer 
  8. *  Copyright 1992 Persistence of Vision Team
  9. *---------------------------------------------------------------------------
  10. *  Copying, distribution and legal info is in the file povlegal.doc which
  11. *  should be distributed with this file. If povlegal.doc is not available
  12. *  or for more info please contact:
  13. *
  14. *       Drew Wells [POV-Team Leader] 
  15. *       CIS: 73767,1244  Internet: 73767.1244@compuserve.com
  16. *       Phone: (213) 254-4041
  17. * This program is based on the popular DKB raytracer version 2.12.
  18. * DKBTrace was originally written by David K. Buck.
  19. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  20. *
  21. *****************************************************************************/
  22.  
  23. extern long Calls_To_Noise, Calls_To_DNoise;
  24.  
  25. #define MINX    -10000        /* Ridiculously large scaling values */
  26. #define MINY    MINX
  27. #define MINZ    MINX
  28.  
  29. #define MAXSIZE 267
  30. #define RNDMASK 0x7FFF
  31. #define RNDDIVISOR (float) RNDMASK
  32. #define NUMBER_OF_WAVES 10
  33. #define SINTABSIZE 1000
  34.  
  35. #define FLOOR(x) ((x) >= 0.0 ? floor(x) : (0.0 - floor(0.0 - (x)) - 1.0))
  36. #define FABS(x) ((x) < 0.0 ? (0.0 - x) : (x))
  37. #define SCURVE(a) ((a)*(a)*(3.0-2.0*(a)))
  38. #define REALSCALE ( 2.0 / 65535.0 )
  39. #define Hash3d(a,b,c) hashTable[(int)(hashTable[(int)(hashTable[(int)((a) & 0xfffL)] ^ ((b) & 0xfffL))] ^ ((c) & 0xfffL))]
  40. #define INCRSUM(m,s,x,y,z)    ((s)*(RTable[m]*0.5        \
  41. + RTable[m+1]*(x)    \
  42.                     + RTable[m+2]*(y)    \
  43.                     + RTable[m+3]*(z)))
  44.  
  45. extern int Options;
  46. extern DBL *sintab;
  47. extern DBL frequency[NUMBER_OF_WAVES];
  48. extern VECTOR Wave_Sources[NUMBER_OF_WAVES];
  49. extern DBL *RTable;
  50. extern short *hashTable;
  51. extern unsigned short crctab[256];
  52.