home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / Lighting / lighting_main.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-31  |  1.7 KB  |  102 lines

  1. #ifndef __LIGHTING_MAIN_H__
  2. #define __LIGHTING_MAIN_H__
  3.  
  4. /* Defines and stuff */
  5. /* ================= */
  6.  
  7. #define TILE_CACHE_SIZE 16
  8.  
  9. /* Typedefs */
  10. /* ======== */
  11.  
  12. typedef enum
  13. {
  14.   POINT_LIGHT,
  15.   DIRECTIONAL_LIGHT,
  16.   SPOT_LIGHT, 
  17.   NO_LIGHT
  18. } LightType;
  19.  
  20. enum
  21. {
  22.   LINEAR_MAP,
  23.   LOGARITHMIC_MAP,
  24.   SINUSOIDAL_MAP,
  25.   SPHERICAL_MAP
  26. };
  27.  
  28. enum
  29. {
  30.   IMAGE_BUMP,
  31.   WAVES_BUMP
  32. };
  33.  
  34. typedef struct
  35. {
  36.   gdouble ambient_int;
  37.   gdouble diffuse_int;
  38.   gdouble diffuse_ref;
  39.   gdouble specular_ref;
  40.   gdouble highlight;
  41.   GckRGB  color;
  42. } MaterialSettings;
  43.  
  44. typedef struct
  45. {
  46.   LightType   type;
  47.   GimpVector3 position;
  48.   GimpVector3 direction;
  49.   GckRGB      color;
  50.   gdouble     intensity;
  51. } LightSettings;
  52.  
  53. typedef struct
  54. {
  55.   gint32 drawable_id;
  56.   gint32 bumpmap_id;
  57.   gint32 envmap_id;
  58.  
  59.   /* Render variables */
  60.   /* ================ */
  61.  
  62.   GimpVector3      viewpoint;
  63.   GimpVector3      planenormal;
  64.   LightSettings    lightsource;
  65.   MaterialSettings material;
  66.   MaterialSettings ref_material;
  67.  
  68.   gdouble pixel_treshold;
  69.   gdouble bumpmax,bumpmin;
  70. /*  gdouble wave_cx,wave_cy;
  71.   gdouble wave_lx,wave_ly;
  72.   gdouble wave_amp,wave_ph; */
  73.   gint    max_depth;
  74.   gint    bumpmaptype;
  75. /*  gint    bumptype; */
  76.  
  77.   /* Flags */
  78.   /* ===== */
  79.  
  80.   gint antialiasing;
  81.   gint create_new_image;
  82.   gint transparent_background;
  83.   gint bump_mapped;
  84.   gint env_mapped;
  85.   gint ref_mapped;
  86.   gint bumpstretch;
  87.   gint previewquality;
  88.  
  89.   /* Misc */
  90.   /* ==== */
  91.   
  92.   gdouble preview_zoom_factor;
  93. } LightingValues;
  94.  
  95. /* Externally visible variables */
  96. /* ============================ */
  97.  
  98. extern LightingValues mapvals;
  99. extern GckRGB         background;
  100.  
  101. #endif  /* __LIGHTING_MAIN_H__ */
  102.