70 double angle_x, angle_y;
110 q_a = axis_to_quat (
axis, -
pi*angle_y/180.0);
114 q_b = axis_to_quat (
axis, -
pi*angle_x/180.0);
116 view -> anim -> last ->
img -> rotation_quaternion = q4_mul (q_a, q_b);
118 view -> anim -> last ->
img -> c_angle[0] = - angle_x;
119 view -> anim -> last ->
img -> c_angle[1] = - angle_y;
125 if (view -> rep_win -> camera_widg[i+3] && GTK_IS_WIDGET(view -> rep_win -> camera_widg[i+3]))
127 gtk_spin_button_set_value ((GtkSpinButton *)view -> rep_win -> camera_widg[i+3], view -> anim -> last ->
img -> c_angle[i]);
144 GtkWidget * menup = gtk_menu_new ();
147 gtk_menu_shell_append ((GtkMenuShell *)menup, r);
150 gtk_menu_shell_append ((GtkMenuShell *)menup, l);
153 gtk_menu_shell_append ((GtkMenuShell *)menup, t);
156 gtk_menu_shell_append ((GtkMenuShell *)menup,
b);
159 gtk_menu_shell_append ((GtkMenuShell *)menup, f);
162 gtk_menu_shell_append ((GtkMenuShell *)menup,
a);
191 GMenu * menu = g_menu_new ();
192 gchar * projection[6]={
"Right [1, 0, 0]",
"Left [-1, 0, 0]",
"Top [0, 1, 0]",
"Bottom [0, -1, 0]",
"Front [0, 0, 1]",
"Back [0, 0, -1]"};
196 append_opengl_item (view, menu, projection[i],
"proj", popm, i, NULL,
IMG_NONE, NULL, FALSE, G_CALLBACK(
to_set_camera_pos), & view ->
colorp[i][0], FALSE, FALSE, FALSE, TRUE);
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
project * get_project_by_id(int p)
get project pointer using id number
void update(glwin *view)
update the rendering of the OpenGL window
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
struct axis axis
axis layout data structure
Function declarations for the creation of the OpenGL window.
void append_opengl_item(glwin *view, GMenu *menu, const gchar *name, gchar *key, int mpop, int item_id, gchar *accel, int image_format, gpointer icon, gboolean custom, GCallback handler, gpointer data, gboolean check, gboolean status, gboolean radio, gboolean sensitive)
void camera_has_changed(gdouble value, gpointer data)
update camera data
GMenu * menu_proj(glwin *view, int popm)
create the 'View -> Projection' submenu - GTK4
G_MODULE_EXPORT void set_camera_pos(GtkWidget *widg, gpointer data)
set camera position callback
G_MODULE_EXPORT void to_set_camera_pos(GSimpleAction *action, GVariant *parameter, gpointer data)
set camera position callback GTK4
Preference variable declarations.