2000-02-18 07:48:13 +08:00
|
|
|
#ifndef __LIGHTING_MAIN_H__
|
|
|
|
#define __LIGHTING_MAIN_H__
|
1998-06-11 14:04:59 +08:00
|
|
|
|
|
|
|
/* Defines and stuff */
|
|
|
|
/* ================= */
|
|
|
|
|
2008-08-12 03:42:08 +08:00
|
|
|
#define PLUG_IN_PROC "plug-in-lighting"
|
|
|
|
#define PLUG_IN_BINARY "lighting"
|
2011-04-09 02:31:34 +08:00
|
|
|
#define PLUG_IN_ROLE "gimp-lighting"
|
2008-08-12 03:42:08 +08:00
|
|
|
|
1998-06-11 14:04:59 +08:00
|
|
|
#define TILE_CACHE_SIZE 16
|
2004-07-21 02:19:47 +08:00
|
|
|
#define NUM_LIGHTS 6
|
1998-06-11 14:04:59 +08:00
|
|
|
|
|
|
|
/* Typedefs */
|
|
|
|
/* ======== */
|
|
|
|
|
2000-02-18 07:48:13 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
1998-06-11 14:04:59 +08:00
|
|
|
POINT_LIGHT,
|
|
|
|
DIRECTIONAL_LIGHT,
|
2004-07-21 02:19:47 +08:00
|
|
|
SPOT_LIGHT,
|
1998-06-11 14:04:59 +08:00
|
|
|
NO_LIGHT
|
|
|
|
} LightType;
|
|
|
|
|
2000-02-18 07:48:13 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
LINEAR_MAP,
|
|
|
|
LOGARITHMIC_MAP,
|
|
|
|
SINUSOIDAL_MAP,
|
|
|
|
SPHERICAL_MAP
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
1998-06-11 14:04:59 +08:00
|
|
|
IMAGE_BUMP,
|
|
|
|
WAVES_BUMP
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2004-07-21 02:19:47 +08:00
|
|
|
gdouble ambient_int;
|
|
|
|
gdouble diffuse_int;
|
|
|
|
gdouble diffuse_ref;
|
|
|
|
gdouble specular_ref;
|
|
|
|
gdouble highlight;
|
|
|
|
gboolean metallic;
|
|
|
|
GimpRGB color;
|
1998-06-11 14:04:59 +08:00
|
|
|
} MaterialSettings;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-01-11 06:49:45 +08:00
|
|
|
LightType type;
|
|
|
|
GimpVector3 position;
|
|
|
|
GimpVector3 direction;
|
2001-01-02 02:35:09 +08:00
|
|
|
GimpRGB color;
|
2001-01-11 06:49:45 +08:00
|
|
|
gdouble intensity;
|
2004-07-21 02:19:47 +08:00
|
|
|
gboolean active;
|
1998-06-11 14:04:59 +08:00
|
|
|
} LightSettings;
|
|
|
|
|
2000-02-18 07:48:13 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
2004-07-21 02:19:47 +08:00
|
|
|
gint32 drawable_id;
|
|
|
|
gint32 bumpmap_id;
|
|
|
|
gint32 envmap_id;
|
1998-06-11 14:04:59 +08:00
|
|
|
|
|
|
|
/* Render variables */
|
|
|
|
/* ================ */
|
|
|
|
|
2000-02-18 07:48:13 +08:00
|
|
|
GimpVector3 viewpoint;
|
|
|
|
GimpVector3 planenormal;
|
2004-07-17 03:41:21 +08:00
|
|
|
LightSettings lightsource[NUM_LIGHTS];
|
1998-06-11 14:04:59 +08:00
|
|
|
MaterialSettings material;
|
|
|
|
MaterialSettings ref_material;
|
|
|
|
|
2018-04-26 02:31:11 +08:00
|
|
|
gdouble pixel_threshold;
|
2004-07-21 02:19:47 +08:00
|
|
|
gdouble bumpmax,bumpmin;
|
|
|
|
gint max_depth;
|
|
|
|
gint bumpmaptype;
|
1998-06-11 14:04:59 +08:00
|
|
|
|
|
|
|
/* Flags */
|
2004-07-21 02:19:47 +08:00
|
|
|
gint antialiasing;
|
|
|
|
gint create_new_image;
|
|
|
|
gint transparent_background;
|
|
|
|
gint bump_mapped;
|
|
|
|
gint env_mapped;
|
|
|
|
gint ref_mapped;
|
|
|
|
gint bumpstretch;
|
|
|
|
gint previewquality;
|
|
|
|
gboolean symbols;
|
|
|
|
gboolean interactive_preview;
|
1998-06-11 14:04:59 +08:00
|
|
|
|
|
|
|
/* Misc */
|
2004-07-21 02:19:47 +08:00
|
|
|
gboolean update_enabled;
|
|
|
|
gint light_selected;
|
|
|
|
gboolean light_isolated;
|
|
|
|
gdouble preview_zoom_factor;
|
1998-06-11 14:04:59 +08:00
|
|
|
} LightingValues;
|
|
|
|
|
|
|
|
/* Externally visible variables */
|
|
|
|
/* ============================ */
|
|
|
|
|
|
|
|
extern LightingValues mapvals;
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
#endif /* __LIGHTING_MAIN_H__ */
|