67 double angle_x, angle_y;
100 q_a = axis_to_quat (
axis, -
pi*angle_y/180.0);
104 q_b = axis_to_quat (
axis, -
pi*angle_x/180.0);
105 get_project_by_id(
id ->
a) -> modelgl -> anim -> last ->
img -> rotation_quaternion = q4_mul (q_a, q_b);
119 GtkWidget * menup = gtk_menu_new ();
122 gtk_menu_shell_append ((GtkMenuShell *)menup, r);
125 gtk_menu_shell_append ((GtkMenuShell *)menup, l);
128 gtk_menu_shell_append ((GtkMenuShell *)menup, t);
131 gtk_menu_shell_append ((GtkMenuShell *)menup,
b);
134 gtk_menu_shell_append ((GtkMenuShell *)menup, f);
137 gtk_menu_shell_append ((GtkMenuShell *)menup,
a);
166 GMenu * menu = g_menu_new ();
167 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]"};
171 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...
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)
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