summaryrefslogtreecommitdiffstats
path: root/plug-ins/lighting/lighting-main.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
commit3c57dd931145d43f2b0aef96c4d178135956bf91 (patch)
tree3de698981e9f0cc2c4f9569b19a5f3595e741f6b /plug-ins/lighting/lighting-main.h
parentInitial commit. (diff)
downloadgimp-3c57dd931145d43f2b0aef96c4d178135956bf91.tar.xz
gimp-3c57dd931145d43f2b0aef96c4d178135956bf91.zip
Adding upstream version 2.10.36.upstream/2.10.36
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--plug-ins/lighting/lighting-main.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/plug-ins/lighting/lighting-main.h b/plug-ins/lighting/lighting-main.h
new file mode 100644
index 0000000..f547b2d
--- /dev/null
+++ b/plug-ins/lighting/lighting-main.h
@@ -0,0 +1,104 @@
+#ifndef __LIGHTING_MAIN_H__
+#define __LIGHTING_MAIN_H__
+
+/* Defines and stuff */
+/* ================= */
+
+#define PLUG_IN_PROC "plug-in-lighting"
+#define PLUG_IN_BINARY "lighting"
+#define PLUG_IN_ROLE "gimp-lighting"
+
+#define TILE_CACHE_SIZE 16
+#define NUM_LIGHTS 6
+
+/* Typedefs */
+/* ======== */
+
+typedef enum
+{
+ POINT_LIGHT,
+ DIRECTIONAL_LIGHT,
+ SPOT_LIGHT,
+ NO_LIGHT
+} LightType;
+
+enum
+{
+ LINEAR_MAP,
+ LOGARITHMIC_MAP,
+ SINUSOIDAL_MAP,
+ SPHERICAL_MAP
+};
+
+enum
+{
+ IMAGE_BUMP,
+ WAVES_BUMP
+};
+
+typedef struct
+{
+ gdouble ambient_int;
+ gdouble diffuse_int;
+ gdouble diffuse_ref;
+ gdouble specular_ref;
+ gdouble highlight;
+ gboolean metallic;
+ GimpRGB color;
+} MaterialSettings;
+
+typedef struct
+{
+ LightType type;
+ GimpVector3 position;
+ GimpVector3 direction;
+ GimpRGB color;
+ gdouble intensity;
+ gboolean active;
+} LightSettings;
+
+typedef struct
+{
+ gint32 drawable_id;
+ gint32 bumpmap_id;
+ gint32 envmap_id;
+
+ /* Render variables */
+ /* ================ */
+
+ GimpVector3 viewpoint;
+ GimpVector3 planenormal;
+ LightSettings lightsource[NUM_LIGHTS];
+ MaterialSettings material;
+ MaterialSettings ref_material;
+
+ gdouble pixel_threshold;
+ gdouble bumpmax,bumpmin;
+ gint max_depth;
+ gint bumpmaptype;
+
+ /* 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;
+
+ /* Misc */
+ gboolean update_enabled;
+ gint light_selected;
+ gboolean light_isolated;
+ gdouble preview_zoom_factor;
+} LightingValues;
+
+/* Externally visible variables */
+/* ============================ */
+
+extern LightingValues mapvals;
+
+#endif /* __LIGHTING_MAIN_H__ */