atomes 1.1.14
atomes: an atomic scale modeling tool box
|
Functions to create the OpenGL parameters edition window. More...
Go to the source code of this file.
Macros | |
#define | TEMPLATES 7 |
Functions | |
void | set_quality (int q, glwin *view) |
set OpenGL quality | |
GtkWidget * | adv_box (GtkWidget *box, char *lab, int size, float xalign) |
create a box with markup label | |
G_MODULE_EXPORT void | toggled_delete_ligth (GtkToggleButton *but, gpointer data) |
toggle delete light callback GTK3 | |
G_MODULE_EXPORT void | run_light_source_to_be_removed (GtkDialog *win, gint response_id, gpointer data) |
remove light source(s) - running the dialog | |
int * | light_source_to_be_removed (int val, image *img, opengl_edition *ogl_edit) |
remove light source(s) - creating the dialog | |
void | print_light_source (Light source, int i) |
print light source data | |
Light | init_light_source (int type, float val, float vbl) |
initialize a light source | |
Light | copy_light_source (Light old_sp) |
create a copy of a light source | |
Light * | copy_light_sources (int dima, int dimb, Light *old_sp) |
create a copy of a list of light sources | |
void | show_active_light_data (opengl_edition *ogl_win, int lid, int tid) |
show active light data | |
void | update_light_data (int li, opengl_edition *ogl_win) |
update light data | |
G_MODULE_EXPORT void | show_light_param (GtkComboBox *box, gpointer data) |
update light parameters based on light id in combo box | |
void | create_lights_combo (image *this_image, opengl_edition *ogl_win) |
create light combo box | |
void | add_remove_lights (int val, gpointer data) |
add or remove lights | |
G_MODULE_EXPORT void | set_nlights_spin (GtkSpinButton *res, gpointer data) |
change the number of light(s) - spin button | |
G_MODULE_EXPORT void | set_nlights (GtkEntry *res, gpointer data) |
change the number of light(s) - entry | |
G_MODULE_EXPORT void | update_light_param (GtkEntry *res, gpointer data) |
update light parameter | |
void | set_data_pos (vec3_t *vect, int pos, double v) |
modify a vector component | |
G_MODULE_EXPORT void | set_object_pos (GtkEntry *res, gpointer data) |
set object position | |
G_MODULE_EXPORT void | set_light_type (GtkComboBox *box, gpointer data) |
set light type callback | |
G_MODULE_EXPORT void | set_light_fix (GtkComboBox *box, gpointer data) |
set light fix callback | |
G_MODULE_EXPORT void | show_this_light (GtkToggleButton *but, gpointer data) |
show / hide this light callback GTK3 | |
GtkWidget * | create_setting_pos (int pid, int lid, float *values, opengl_edition *ogl_win) |
create OpenGL setting entries table | |
GtkWidget * | lights_tab (glwin *view, opengl_edition *ogl_edit) |
OpenGL light(s) parameters tab. | |
G_MODULE_EXPORT void | set_use_template_toggle (GtkToggleButton *but, gpointer data) |
use or not OpenGL material template callback GTK3 | |
G_MODULE_EXPORT void | set_template (GtkComboBox *box, gpointer data) |
change the OpenGL material template | |
G_MODULE_EXPORT void | set_l_model (GtkComboBox *box, gpointer data) |
change OpenGL lightning model | |
void | param_has_changed (gpointer data, double val) |
update OpenGL material parameter | |
G_MODULE_EXPORT void | update_mat_param (GtkEntry *res, gpointer data) |
update OpenGL material parameter - entry | |
G_MODULE_EXPORT gboolean | scroll_scale_param (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data) |
update OpenGL material parameter - scroll callback | |
G_MODULE_EXPORT void | scale_param (GtkRange *range, gpointer data) |
update OpenGL material parameter - range callback | |
G_MODULE_EXPORT gboolean | scroll_scale_quality (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data) |
update OpenGL quality - scroll callback | |
G_MODULE_EXPORT void | scale_quality (GtkRange *range, gpointer data) |
update OpenGL quality - range callback | |
GtkWidget * | materials_tab (glwin *view, opengl_edition *ogl_edit) |
OpenGL material parameters tab. | |
void | fog_param_changed (gpointer data, GLfloat u, GtkRange *range) |
update OpenGL fog parameter | |
G_MODULE_EXPORT gboolean | scroll_set_fog_param (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data) |
update OpenGL fog parameter - scroll callback | |
G_MODULE_EXPORT void | set_fog_param (GtkRange *range, gpointer data) |
update OpenGL fog parameter - range callback | |
G_MODULE_EXPORT void | set_fog_type (GtkWidget *widg, gpointer data) |
set OpenGL fog type | |
void | setup_fog_dialogs (glwin *view, int fid) |
update OpenGL fog tab based of fog type | |
G_MODULE_EXPORT void | set_fog_mode (GtkWidget *widg, gpointer data) |
set fog mode callback | |
GtkWidget * | fog_tab (glwin *view, opengl_edition *ogl_edit) |
OpenGL fog parameters tab. | |
void | close_advanced_opengl (gpointer data) |
close OpenGL rendering window free data | |
G_MODULE_EXPORT gboolean | close_advanced (GtkWidget *widg, GdkEvent *event, gpointer data) |
close OpenGL rendering advanced window callback GTK3 | |
G_MODULE_EXPORT void | opengl_advanced (GtkWidget *widg, gpointer data) |
create OpenGL rendering advanced window | |
Variables | |
gchar * | material_template [TEMPLATES] |
GLfloat | template_parameters [TEMPLATES][5] |
float | mat_min_max [5][2] |
gchar * | settings [3][10] |
gchar * | lpos [3] = {"x", "y", "z"} |
gchar * | cpos [3] = {"r", "g", "b"} |
GtkWidget * | d_close |
int | status |
int * | light_list |
GtkWidget ** | light_but |
Functions to create the OpenGL parameters edition window.
Definition in file w_advance.c.
#define TEMPLATES 7 |
Definition at line 93 of file w_advance.c.
void add_remove_lights | ( | int | val, |
gpointer | data ) |
add or remove lights
val | total number of light(s) |
data | the associated data pointer |
Definition at line 530 of file w_advance.c.
GtkWidget * adv_box | ( | GtkWidget * | box, |
char * | lab, | ||
int | size, | ||
float | xalign ) |
create a box with markup label
box | the GtkWidget sending the signal |
lab | label |
size | size |
xalign | x alignement |
Definition at line 150 of file w_advance.c.
G_MODULE_EXPORT gboolean close_advanced | ( | GtkWidget * | widg, |
GdkEvent * | event, | ||
gpointer | data ) |
close OpenGL rendering advanced window callback GTK3
widg | the GtkWidget sending the signal |
event | the GdkEvent triggering the signal |
data | the associated data pointer |
Definition at line 1462 of file w_advance.c.
void close_advanced_opengl | ( | gpointer | data | ) |
close OpenGL rendering window free data
data | the associated data pointer |
Definition at line 1434 of file w_advance.c.
create a copy of a light source
old_sp | the light source to copy |
Definition at line 368 of file w_advance.c.
create a copy of a list of light sources
dima | new list size |
dimb | old list size to duplicate |
old_sp | old light sources |
Definition at line 391 of file w_advance.c.
void create_lights_combo | ( | image * | this_image, |
opengl_edition * | ogl_win ) |
create light combo box
this_image | the target image parameters |
ogl_win | the target OpenGL edition window |
Definition at line 506 of file w_advance.c.
GtkWidget * create_setting_pos | ( | int | pid, |
int | lid, | ||
float * | values, | ||
opengl_edition * | ogl_win ) |
create OpenGL setting entries table
pid | parameter id (0 = material, 1 = light direction, 2 = light position, 3 = light intensity, 4 = fog) |
lid | parameter label id |
values | target parameter values |
ogl_win | the target OpenGL edition window |
Definition at line 827 of file w_advance.c.
void fog_param_changed | ( | gpointer | data, |
GLfloat | u, | ||
GtkRange * | range ) |
update OpenGL fog parameter
data | the associated data pointer |
u | the new value |
range | the GtkRange to udapte if needed |
Definition at line 1233 of file w_advance.c.
GtkWidget * fog_tab | ( | glwin * | view, |
opengl_edition * | ogl_edit ) |
OpenGL fog parameters tab.
view | the target glwin |
ogl_edit | the target OpenGL edition window |
Definition at line 1370 of file w_advance.c.
Light init_light_source | ( | int | type, |
float | val, | ||
float | vbl ) |
initialize a light source
type | the type of light |
val | |
vbl |
Definition at line 324 of file w_advance.c.
int * light_source_to_be_removed | ( | int | val, |
image * | img, | ||
opengl_edition * | ogl_edit ) |
remove light source(s) - creating the dialog
val | number of light(s) to remove |
img | the target image |
ogl_edit | the target OpenGL edition window |
Definition at line 245 of file w_advance.c.
GtkWidget * lights_tab | ( | glwin * | view, |
opengl_edition * | ogl_edit ) |
OpenGL light(s) parameters tab.
view | the target glwin |
ogl_edit | the target OpenGL edition window |
Definition at line 868 of file w_advance.c.
GtkWidget * materials_tab | ( | glwin * | view, |
opengl_edition * | ogl_edit ) |
OpenGL material parameters tab.
view | the target glwin |
ogl_edit | the target OpenGL edition window |
Definition at line 1148 of file w_advance.c.
G_MODULE_EXPORT void opengl_advanced | ( | GtkWidget * | widg, |
gpointer | data ) |
create OpenGL rendering advanced window
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 1477 of file w_advance.c.
void param_has_changed | ( | gpointer | data, |
double | val ) |
update OpenGL material parameter
data | the associated data pointer |
val | the new value |
Definition at line 1047 of file w_advance.c.
void print_light_source | ( | Light | source, |
int | i ) |
print light source data
source | the light source |
i | the light source id |
Definition at line 285 of file w_advance.c.
G_MODULE_EXPORT void run_light_source_to_be_removed | ( | GtkDialog * | win, |
gint | response_id, | ||
gpointer | data ) |
remove light source(s) - running the dialog
win | the GtkDialog sending the signal |
response_id | the response id |
data | the associated data pointer |
Definition at line 216 of file w_advance.c.
G_MODULE_EXPORT void scale_param | ( | GtkRange * | range, |
gpointer | data ) |
update OpenGL material parameter - range callback
range | the GtkRange sending the signal |
data | the associated data pointer |
Definition at line 1100 of file w_advance.c.
G_MODULE_EXPORT void scale_quality | ( | GtkRange * | range, |
gpointer | data ) |
update OpenGL quality - range callback
range | the GtkRange sending the signal |
data | the associated data pointer |
Definition at line 1132 of file w_advance.c.
G_MODULE_EXPORT gboolean scroll_scale_param | ( | GtkRange * | range, |
GtkScrollType | scroll, | ||
gdouble | value, | ||
gpointer | data ) |
update OpenGL material parameter - scroll callback
range | the GtkRange sending the signal |
scroll | the associated scroll type |
value | the range value |
data | the associated data pointer |
Definition at line 1086 of file w_advance.c.
G_MODULE_EXPORT gboolean scroll_scale_quality | ( | GtkRange * | range, |
GtkScrollType | scroll, | ||
gdouble | value, | ||
gpointer | data ) |
update OpenGL quality - scroll callback
range | the GtkRange sending the signal |
scroll | the associated scroll type |
value | the range value |
data | the associated data pointer |
Definition at line 1115 of file w_advance.c.
G_MODULE_EXPORT gboolean scroll_set_fog_param | ( | GtkRange * | range, |
GtkScrollType | scroll, | ||
gdouble | value, | ||
gpointer | data ) |
update OpenGL fog parameter - scroll callback
range | the GtkRange sending the signal |
scroll | the associated scroll type |
value | the range value |
data | the associated data pointer |
Definition at line 1280 of file w_advance.c.
void set_data_pos | ( | vec3_t * | vect, |
int | pos, | ||
double | v ) |
modify a vector component
vect | vector to adjust |
pos | position to adjust |
v | new value |
Definition at line 689 of file w_advance.c.
G_MODULE_EXPORT void set_fog_mode | ( | GtkWidget * | widg, |
gpointer | data ) |
set fog mode callback
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 1355 of file w_advance.c.
G_MODULE_EXPORT void set_fog_param | ( | GtkRange * | range, |
gpointer | data ) |
update OpenGL fog parameter - range callback
range | the GtkRange sending the signal |
data | the associated data pointer |
Definition at line 1294 of file w_advance.c.
G_MODULE_EXPORT void set_fog_type | ( | GtkWidget * | widg, |
gpointer | data ) |
set OpenGL fog type
widg | the GtkWidget sending the signal |
data | the associated data pointer |
Definition at line 1307 of file w_advance.c.
G_MODULE_EXPORT void set_l_model | ( | GtkComboBox * | box, |
gpointer | data ) |
change OpenGL lightning model
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 1032 of file w_advance.c.
G_MODULE_EXPORT void set_light_fix | ( | GtkComboBox * | box, |
gpointer | data ) |
set light fix callback
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 773 of file w_advance.c.
G_MODULE_EXPORT void set_light_type | ( | GtkComboBox * | box, |
gpointer | data ) |
set light type callback
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 757 of file w_advance.c.
G_MODULE_EXPORT void set_nlights | ( | GtkEntry * | res, |
gpointer | data ) |
change the number of light(s) - entry
res | the GtkEntry sending the signal |
data | the associated data pointer |
Definition at line 626 of file w_advance.c.
G_MODULE_EXPORT void set_nlights_spin | ( | GtkSpinButton * | res, |
gpointer | data ) |
change the number of light(s) - spin button
res | the GtkSpinButton sending the signal |
data | the associated data pointer |
Definition at line 613 of file w_advance.c.
G_MODULE_EXPORT void set_object_pos | ( | GtkEntry * | res, |
gpointer | data ) |
set object position
res | the GtkEntry sending the signal |
data | the associated data pointer |
Definition at line 713 of file w_advance.c.
|
extern |
set OpenGL quality
q | new OpenGL quality |
view | the target glwin |
Definition at line 59 of file m_quality.c.
G_MODULE_EXPORT void set_template | ( | GtkComboBox * | box, |
gpointer | data ) |
change the OpenGL material template
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 1005 of file w_advance.c.
G_MODULE_EXPORT void set_use_template_toggle | ( | GtkToggleButton * | but, |
gpointer | data ) |
use or not OpenGL material template callback GTK3
but | the GtkToggleButton sending the signal |
data | the associated data pointer |
Definition at line 969 of file w_advance.c.
void setup_fog_dialogs | ( | glwin * | view, |
int | fid ) |
update OpenGL fog tab based of fog type
view | the target glwin |
fid | the fog mode |
Definition at line 1323 of file w_advance.c.
void show_active_light_data | ( | opengl_edition * | ogl_win, |
int | lid, | ||
int | tid ) |
show active light data
ogl_win | the target OpenGL edition window |
lid | the light id |
tid | the light type |
Definition at line 421 of file w_advance.c.
G_MODULE_EXPORT void show_light_param | ( | GtkComboBox * | box, |
gpointer | data ) |
update light parameters based on light id in combo box
box | the GtkComboBox sending the signal |
data | the associated data pointer |
Definition at line 492 of file w_advance.c.
G_MODULE_EXPORT void show_this_light | ( | GtkToggleButton * | but, |
gpointer | data ) |
show / hide this light callback GTK3
but | the GtkToggleButton sending the signal |
data | the associated data pointer |
Definition at line 802 of file w_advance.c.
G_MODULE_EXPORT void toggled_delete_ligth | ( | GtkToggleButton * | but, |
gpointer | data ) |
toggle delete light callback GTK3
but | the GtkToggleButton sending the signal |
data | the associated data pointer |
Definition at line 183 of file w_advance.c.
void update_light_data | ( | int | li, |
opengl_edition * | ogl_win ) |
update light data
li | the light id |
ogl_win | the target OpenGL edition window |
Definition at line 456 of file w_advance.c.
G_MODULE_EXPORT void update_light_param | ( | GtkEntry * | res, |
gpointer | data ) |
update light parameter
res | the GtkEntry sending the signal |
data | the associated data pointer |
Definition at line 643 of file w_advance.c.
G_MODULE_EXPORT void update_mat_param | ( | GtkEntry * | res, |
gpointer | data ) |
update OpenGL material parameter - entry
res | the GtkEntry sending the signal |
data | the associated data pointer |
Definition at line 1069 of file w_advance.c.
gchar* cpos[3] = {"r", "g", "b"} |
Definition at line 138 of file w_advance.c.
GtkWidget* d_close |
Definition at line 159 of file w_advance.c.
GtkWidget** light_but |
Definition at line 205 of file w_advance.c.
int* light_list |
Definition at line 204 of file w_advance.c.
gchar* lpos[3] = {"x", "y", "z"} |
Definition at line 137 of file w_advance.c.
float mat_min_max[5][2] |
Definition at line 113 of file w_advance.c.
gchar* material_template[TEMPLATES] |
Definition at line 97 of file w_advance.c.
gchar* settings[3][10] |
Definition at line 119 of file w_advance.c.
int status |
Definition at line 160 of file w_advance.c.
GLfloat template_parameters[TEMPLATES][5] |
Definition at line 105 of file w_advance.c.