ATMOSPH.H 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /****************************************************************************
  2. * atmoshp.h
  3. *
  4. * This module contains all defines, typedefs, and prototypes for ATMOSPH.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. #ifndef ATMOSPH_H
  24. #define ATMOSPH_H
  25. /*****************************************************************************
  26. * Global preprocessor defines
  27. ******************************************************************************/
  28. /* Define fog types. DMF */
  29. #define ORIG_FOG 1
  30. #define GROUND_MIST 2
  31. #define FOG_TYPES 2
  32. /*****************************************************************************
  33. * Global typedefs
  34. ******************************************************************************/
  35. typedef struct Fog_Struct FOG;
  36. typedef struct Rainbow_Struct RAINBOW;
  37. typedef struct Skysphere_Struct SKYSPHERE;
  38. struct Fog_Struct
  39. {
  40. int Type;
  41. DBL Distance;
  42. DBL Alt;
  43. DBL Offset;
  44. COLOUR Colour;
  45. VECTOR Up;
  46. TURB *Turb;
  47. SNGL Turb_Depth;
  48. FOG *Next;
  49. };
  50. struct Rainbow_Struct
  51. {
  52. DBL Distance;
  53. DBL Jitter;
  54. DBL Angle, Width;
  55. DBL Arc_Angle, Falloff_Angle, Falloff_Width;
  56. VECTOR Antisolar_Vector;
  57. VECTOR Up_Vector, Right_Vector;
  58. PIGMENT *Pigment;
  59. RAINBOW *Next;
  60. };
  61. struct Skysphere_Struct
  62. {
  63. int Count; /* Number of pigments. */
  64. PIGMENT **Pigments; /* Pigment(s) to use. */
  65. TRANSFORM *Trans; /* Skysphere transformation. */
  66. };
  67. /*****************************************************************************
  68. * Global variables
  69. ******************************************************************************/
  70. /*****************************************************************************
  71. * Global functions
  72. ******************************************************************************/
  73. void Initialize_Atmosphere_Code (void);
  74. void Deinitialize_Atmosphere_Code (void);
  75. void Do_Infinite_Atmosphere (RAY *Ray, COLOUR Colour);
  76. void Do_Finite_Atmosphere (RAY *Ray, INTERSECTION *Intersection, COLOUR Colour, int Light_Source_Flag);
  77. FOG *Create_Fog (void);
  78. FOG *Copy_Fog (FOG *Fog);
  79. void Destroy_Fog (FOG *Fog);
  80. RAINBOW *Create_Rainbow (void);
  81. RAINBOW *Copy_Rainbow (RAINBOW *Rainbow);
  82. void Destroy_Rainbow (RAINBOW *Rainbow);
  83. SKYSPHERE *Create_Skysphere (void);
  84. SKYSPHERE *Copy_Skysphere (SKYSPHERE *Skysphere);
  85. void Destroy_Skysphere (SKYSPHERE *Skysphere);
  86. void Scale_Skysphere (SKYSPHERE *Skysphere, VECTOR Vector);
  87. void Rotate_Skysphere (SKYSPHERE *Skysphere, VECTOR Vector);
  88. void Translate_Skysphere (SKYSPHERE *Skysphere, VECTOR Vector);
  89. void Transform_Skysphere (SKYSPHERE *Skysphere, TRANSFORM *Trans);
  90. #endif