~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/Lighting/lighting_main.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

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