gimp/plug-ins/lighting/lighting-main.h

105 lines
1.9 KiB
C
Raw Permalink Normal View History

#ifndef __LIGHTING_MAIN_H__
#define __LIGHTING_MAIN_H__
1998-06-11 06:04:59 +00:00
/* Defines and stuff */
/* ================= */
#define PLUG_IN_PROC "plug-in-lighting"
#define PLUG_IN_BINARY "lighting"
#define PLUG_IN_ROLE "gimp-lighting"
1998-06-11 06:04:59 +00:00
#define TILE_CACHE_SIZE 16
#define NUM_LIGHTS 6
1998-06-11 06:04:59 +00:00
/* Typedefs */
/* ======== */
typedef enum
{
1998-06-11 06:04:59 +00:00
POINT_LIGHT,
DIRECTIONAL_LIGHT,
SPOT_LIGHT,
1998-06-11 06:04:59 +00:00
NO_LIGHT
} LightType;
enum
{
LINEAR_MAP,
LOGARITHMIC_MAP,
SINUSOIDAL_MAP,
SPHERICAL_MAP
};
enum
{
1998-06-11 06:04:59 +00:00
IMAGE_BUMP,
WAVES_BUMP
};
typedef struct
{
gdouble ambient_int;
gdouble diffuse_int;
gdouble diffuse_ref;
gdouble specular_ref;
gdouble highlight;
gboolean metallic;
1998-06-11 06:04:59 +00:00
} MaterialSettings;
typedef struct
{
finished new GimpColorArea widget which uses GimpRGB and handles DND and 2001-01-10 Sven Neumann <sven@gimp.org> * libgimp/gimpcolorarea.[ch]: finished new GimpColorArea widget which uses GimpRGB and handles DND and alpha channel. * libgimp/gimpcolorbutton.[ch]: use GimpColorArea. The API of the GimpColorButton has changed! * libgimp/gimpwidgets.[ch]: added temporary function gimp_color_update_uchar() to ease migration of plug-ins to GimpRGB. This function will go away. * plug-ins/Lighting/lighting_main.h * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_main.h * plug-ins/MapObject/mapobject_ui.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/sinus.c * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/ifscompose/ifscompose.[ch] * plug-ins/ifscompose/ifscompose_storage.c * plug-ins/ifscompose/ifscompose_utils.c * plug-ins/script-fu/script-fu-scripts.c: use new GimpColorArea and GimpColorButton. Started to introduce GimpRGB color type. This change might have broken some of these plug-ins. This is work in progress. * libgimp/Makefile.am: added GimpColorArea and GimpColorButton to libgimpi. * app/gimpcontext.[ch]: added gimp_palette_get_[fore|back]ground() functions so the app can link against libgimp/gimpcolorbutton.o. These functions will go away. * app/gimpdnd.c: use a GimpColorArea for DND
2001-01-10 22:49:45 +00:00
LightType type;
GimpVector3 position;
GimpVector3 direction;
gdouble color[4];
finished new GimpColorArea widget which uses GimpRGB and handles DND and 2001-01-10 Sven Neumann <sven@gimp.org> * libgimp/gimpcolorarea.[ch]: finished new GimpColorArea widget which uses GimpRGB and handles DND and alpha channel. * libgimp/gimpcolorbutton.[ch]: use GimpColorArea. The API of the GimpColorButton has changed! * libgimp/gimpwidgets.[ch]: added temporary function gimp_color_update_uchar() to ease migration of plug-ins to GimpRGB. This function will go away. * plug-ins/Lighting/lighting_main.h * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_main.h * plug-ins/MapObject/mapobject_ui.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/sinus.c * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/ifscompose/ifscompose.[ch] * plug-ins/ifscompose/ifscompose_storage.c * plug-ins/ifscompose/ifscompose_utils.c * plug-ins/script-fu/script-fu-scripts.c: use new GimpColorArea and GimpColorButton. Started to introduce GimpRGB color type. This change might have broken some of these plug-ins. This is work in progress. * libgimp/Makefile.am: added GimpColorArea and GimpColorButton to libgimpi. * app/gimpcontext.[ch]: added gimp_palette_get_[fore|back]ground() functions so the app can link against libgimp/gimpcolorbutton.o. These functions will go away. * app/gimpdnd.c: use a GimpColorArea for DND
2001-01-10 22:49:45 +00:00
gdouble intensity;
gboolean active;
1998-06-11 06:04:59 +00:00
} LightSettings;
typedef struct
{
gint32 drawable_id;
gint32 bumpmap_id;
gint32 envmap_id;
1998-06-11 06:04:59 +00:00
GimpProcedureConfig *config;
1998-06-11 06:04:59 +00:00
/* Render variables */
/* ================ */
GimpVector3 viewpoint;
GimpVector3 planenormal;
LightSettings lightsource[NUM_LIGHTS];
1998-06-11 06:04:59 +00:00
MaterialSettings material;
gdouble pixel_threshold;
gdouble bumpmax,bumpmin;
gint max_depth;
gint bumpmaptype;
1998-06-11 06:04:59 +00:00
/* Flags */
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 06:04:59 +00:00
/* Misc */
gboolean update_enabled;
gint light_selected;
gboolean light_isolated;
gdouble preview_zoom_factor;
1998-06-11 06:04:59 +00:00
} LightingValues;
/* Externally visible variables */
/* ============================ */
extern LightingValues mapvals;
#endif /* __LIGHTING_MAIN_H__ */