home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / povsrc31.zip / lighting.h < prev    next >
C/C++ Source or Header  |  2000-04-12  |  3KB  |  83 lines

  1. /****************************************************************************
  2. *                   lighting.h
  3. *
  4. *  This module contains all defines, typedefs, and prototypes for LIGHTING.C.
  5. *
  6. *  from Persistence of Vision(tm) Ray Tracer
  7. *  Copyright 1996,1999 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *  NOTICE: This source code file is provided so that users may experiment
  10. *  with enhancements to POV-Ray and to port the software to platforms other
  11. *  than those supported by the POV-Ray Team.  There are strict rules under
  12. *  which you are permitted to use this file.  The rules are in the file
  13. *  named POVLEGAL.DOC which should be distributed with this file.
  14. *  If POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. *  Team Coordinator by email to team-coord@povray.org or visit us on the web at
  16. *  http://www.povray.org. The latest version of POV-Ray may be found at this site.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23.  
  24.  
  25. #ifndef LIGHTING_H
  26. #define LIGHTING_H
  27.  
  28. #include "point.h"
  29.  
  30.  
  31.  
  32. /*****************************************************************************
  33. * Global preprocessor defines
  34. ******************************************************************************/
  35.  
  36. /*DSW*/
  37. /* How many subrays to trace for dispersive media */
  38. #define DEFAULT_DISP_NELEMS  7
  39. /*---*/
  40.  
  41. /*****************************************************************************
  42. * Global typedefs
  43. ******************************************************************************/
  44. /*
  45.  * List to store light colours during shadow testing
  46.  * to avoid repeated testing with layered textures.
  47.  */
  48.  
  49. typedef struct Light_Tested_Struct LIGHT_TESTED;
  50.  
  51. struct Light_Tested_Struct
  52. {
  53.   int    Tested;
  54.   COLOUR Colour;
  55. };
  56.  
  57.  
  58.  
  59. /*****************************************************************************
  60. * Global variables
  61. ******************************************************************************/
  62.  
  63.  
  64.  
  65. /*****************************************************************************
  66. * Global functions
  67. ******************************************************************************/
  68.  
  69. void Determine_Apparent_Colour (INTERSECTION *Ray_Intersection, COLOUR Colour, RAY *Ray, DBL Weight);
  70. void Initialize_Lighting_Code (void);
  71. void Reinitialize_Lighting_Code (int Number_Of_Entries, TEXTURE ***Textures, DBL **Weights);
  72. void Deinitialize_Lighting_Code (void);
  73. int Test_Shadow (LIGHT_SOURCE *Light, DBL *Depth, RAY *Light_Source_Ray, RAY *Eye_Ray, VECTOR P, COLOUR Colour);
  74.  
  75.  
  76. #ifdef UseMediaAndLightCache
  77. void ResizeMediaMallocCaches(long newSize);
  78. void ResizeLightMallocCaches(long newSize);
  79. #endif
  80.  
  81.  
  82. #endif
  83.