atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
save_opengl.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'save_opengl.c'
24*
25* Contains:
26*
27
28 - The functions to save OpenGL information in the atomes project file format
29
30*
31* List of functions:
32
33 int save_atom_a (FILE * fp, project * this_proj, int s, int a);
34 int save_atom_b (FILE * fp, project * this_proj, int s, int a);
35 int save_rings_chains_data (FILE * fp, int type, int size, int steps, int data_max, int ** num_data, gboolean *** show, int **** all_data);
36 int save_opengl_image (FILE * fp, project * this_proj, image * img, int sid);
37
38*/
39
40#include "global.h"
41#include "project.h"
42#include "glwin.h"
43
54int save_atom_a (FILE * fp, project * this_proj, int s, int a)
55{
56 if (fwrite (& this_proj -> atoms[s][a].id, sizeof(int), 1, fp) != 1) return ERROR_RW;
57 if (fwrite (& this_proj -> atoms[s][a].sp, sizeof(int), 1, fp) != 1) return ERROR_RW;
58 if (fwrite (& this_proj -> atoms[s][a].x, sizeof(double), 1, fp) != 1) return ERROR_RW;
59 if (fwrite (& this_proj -> atoms[s][a].y, sizeof(double), 1, fp) != 1) return ERROR_RW;
60 if (fwrite (& this_proj -> atoms[s][a].z, sizeof(double), 1, fp) != 1) return ERROR_RW;
61 //g_debug ("Saving:: step= %d, at= %d, sp[%d]= %d, x[%d]= %f, y[%d]= %f, z[%d]= %f",
62 // s, a+1, a, this_proj -> atoms[s][a].sp, a, this_proj -> atoms[s][a].x, a, this_proj -> atoms[s][a].y, a, this_proj -> atoms[s][a].z);
63 return OK;
64}
65
76int save_atom_b (FILE * fp, project * this_proj, int s, int a)
77{
78 if (fwrite (this_proj -> atoms[s][a].show, sizeof(gboolean), 2, fp) != 2) return ERROR_RW;
79 if (fwrite (this_proj -> atoms[s][a].label, sizeof(gboolean), 2, fp) != 2) return ERROR_RW;
80 if (fwrite (& this_proj -> atoms[s][a].style, sizeof(int), 1, fp) != 1) return ERROR_RW;
81 return OK;
82}
83
98int save_rings_chains_data (FILE * fp, int type, int size, int steps, int data_max, int ** num_data, gboolean *** show, int **** all_data)
99{
100 int i, j, k;
101 if (fwrite (& data_max, sizeof(int), 1, fp) != 1) return ERROR_RW;
102 if (data_max)
103 {
104 for (i=0; i<steps; i++)
105 {
106 if (fwrite (num_data[i], sizeof(int), size, fp) != size) return ERROR_RW;
107 for (j=0; j<size; j++)
108 {
109 if (num_data[i][j])
110 {
111 //g_debug ("type= %d, steps= %d, j= %d, num_data[i][j]= %d", type, step, j, num_data[i][j]);
112 if (! type) if (fwrite (show[i][j], sizeof(int), num_data[i][j], fp) != num_data[i][j]) return ERROR_RW;
113 for (k=0; k<num_data[i][j]; k++)
114 {
115 if (fwrite (all_data[i][j][k], sizeof(int), j+1, fp) != j+1) return ERROR_RW;
116 }
117 }
118 }
119 }
120 }
121 return OK;
122}
123
134int save_opengl_image (FILE * fp, project * this_proj, image * img, int sid)
135{
136 int i, j, k, l;
137 gboolean val;
138 if (fwrite (& img -> backcolor, sizeof(ColRGBA), 1, fp) != 1) return ERROR_RW;
139 if (this_proj -> modelgl -> custom_map != NULL) img -> color_map[0] += 10;
140 if (fwrite (img -> color_map, sizeof(int), 2, fp) != 2) return ERROR_RW;
141 if (this_proj -> modelgl -> custom_map != NULL)
142 {
143 img -> color_map[0] -= 10;
144 colormap * map = this_proj -> modelgl -> custom_map;
145 if (fwrite (& map -> points, sizeof(int), 1, fp) != 1) return ERROR_RW;
146 if (fwrite (& map -> cmax, sizeof(int), 1, fp) != 1) return ERROR_RW;
147 if (fwrite (& map -> cmin, sizeof(int), 1, fp) != 1) return ERROR_RW;
148 if (fwrite (map -> positions, sizeof(float), map -> points, fp) != map -> points) return ERROR_RW;
149 if (fwrite (map -> values, sizeof(ColRGBA), map -> points, fp) != map -> points) return ERROR_RW;
150 for (i=0; i<this_proj -> steps; i++)
151 {
152 if (fwrite (map -> data[i], sizeof(float), this_proj -> natomes, fp) != this_proj -> natomes) return ERROR_RW;
153 }
154 }
155
156 if (fwrite (& img -> cloned_poly, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
157 if (fwrite (img -> at_color, sizeof(ColRGBA), sid*2, fp) != sid*2) return ERROR_RW;
158 if (fwrite (img -> sphererad, sizeof(double), sid*2, fp) != sid*2) return ERROR_RW;
159 if (fwrite (img -> pointrad, sizeof(double), sid*2, fp) != sid*2) return ERROR_RW;
160 if (fwrite (img -> atomicrad, sizeof(double), sid*2, fp) != sid*2) return ERROR_RW;
161
162 for (i=0; i<sid*2; i++)
163 {
164 if (fwrite (img -> bondrad[i], sizeof(double), 2*sid, fp) != 2*sid) return ERROR_RW;
165 if (fwrite (img -> linerad[i], sizeof(double), 2*sid, fp) != 2*sid) return ERROR_RW;
166 }
167 if (fwrite (img -> radall, sizeof(double), 2, fp) != 2) return ERROR_RW;
168 if (fwrite (& img -> draw_clones, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
169 if (fwrite (img -> labels_position, sizeof(int), 5, fp) != 5) return ERROR_RW;
170 if (fwrite (img -> labels_render, sizeof(int), 5, fp) != 5) return ERROR_RW;
171 if (fwrite (img -> labels_scale, sizeof(int), 5, fp) != 5) return ERROR_RW;
172 if (fwrite (img -> labels_format, sizeof(int), 2, fp) != 2) return ERROR_RW;
173 for (i=0; i<5; i++)
174 {
175 if (fwrite (img -> labels_shift[i], sizeof(double), 3, fp) != 3) return ERROR_RW;
176 if (img -> labels_color[i] != NULL)
177 {
178 val = TRUE;
179 if (fwrite (& val, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
180 if (i < 2)
181 {
182 j = 2*sid;
183 }
184 else if (i == 2)
185 {
186 j = 3;
187 }
188 else
189 {
190 j = 1;
191 }
192 for (k=0; k<j; k++)
193 {
194 if (fwrite (& img -> labels_color[i][k], sizeof(ColRGBA), 1, fp) != 1) return ERROR_RW;
195 }
196 }
197 else
198 {
199 val = FALSE;
200 if (fwrite (& val, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
201 }
202 if (save_this_string (fp, img -> labels_font[i]) != OK) return ERROR_RW;
203 }
204
205 // Measures
206 if (fwrite (& img -> mtilt, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
207 if (fwrite (& img -> mpattern, sizeof(int), 1, fp) != 1) return ERROR_RW;
208 if (fwrite (& img -> mfactor, sizeof(int), 1, fp) != 1) return ERROR_RW;
209 if (fwrite (& img -> mwidth, sizeof(double), 1, fp) != 1) return ERROR_RW;
210 if (fwrite (& img -> m_is_pressed, sizeof(double), 1, fp) != 1) return ERROR_RW;
211
212 // Model box and axis
213 if (fwrite (img -> box_axis, sizeof(int), 2, fp) != 2) return ERROR_RW;
214 if (fwrite (img -> box_axis_rad, sizeof(double), 2, fp) != 2) return ERROR_RW;
215 if (fwrite (img -> box_axis_line, sizeof(double), 2, fp) != 2) return ERROR_RW;
216 if (fwrite (& img -> box_color, sizeof(ColRGBA), 1, fp) != 1) return ERROR_RW;
217 if (fwrite (img -> extra_cell, sizeof(int), 3, fp) != 3) return ERROR_RW;
218
219 // Axis
220 if (fwrite (& img -> axispos, sizeof(int), 1, fp) != 1) return ERROR_RW;
221 if (fwrite (& img -> axis_length, sizeof(double), 1, fp) != 1) return ERROR_RW;
222 if (fwrite (img -> axis_pos, sizeof(double), 3, fp) != 3) return ERROR_RW;
223 if (img -> axis_color != NULL)
224 {
225 val = TRUE;
226 }
227 else
228 {
229 val = FALSE;
230 }
231 if (fwrite (& val, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
232 if (val)
233 {
234 for (i=0; i<3; i++)
235 {
236 if (fwrite (& img -> axis_color[i], sizeof(ColRGBA), 1, fp) != 1) return ERROR_RW;
237 }
238 }
239 if (fwrite (& img -> axis_labels, sizeof(int), 1, fp) != 1) return ERROR_RW;
240 for (i=0; i<3; i++)
241 {
242 if (save_this_string (fp, img -> axis_title[i]) != OK) return ERROR_RW;
243 }
244 // OpenGL
245 if (fwrite (& img -> p_depth, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
246 if (fwrite (& img -> gnear, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
247 if (fwrite (& img -> gfar, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
248 if (fwrite (& img -> gleft, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
249 if (fwrite (& img -> gright, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
250 if (fwrite (& img -> gtop, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
251 if (fwrite (& img -> gbottom, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
252 if (fwrite (& img -> rotation_quaternion, sizeof(vec4_t), 1, fp) != 1) return ERROR_RW;
253 if (fwrite (& img -> rotation_mode, sizeof(int), 1, fp) != 1) return ERROR_RW;
254 if (fwrite (& img -> zoom, sizeof(GLdouble), 1, fp) != 1) return ERROR_RW;
255 if (fwrite (img -> c_shift, sizeof(GLdouble), 2, fp) != 2) return ERROR_RW;
256 if (fwrite (& img -> style, sizeof(int), 1, fp) != 1) return ERROR_RW;
257 if (fwrite (& img -> quality, sizeof(GLint), 1, fp) != 1) return ERROR_RW;
258 if (fwrite (& img -> render, sizeof(GLint), 1, fp) != 1) return ERROR_RW;
259 if (fwrite (& img -> lights, sizeof(int), 1, fp) != 1) return ERROR_RW;
260 for (i=0; i<img -> lights; i++)
261 {
262 if (fwrite (& img -> l_ght[i].type, sizeof(int), 1, fp) != 1) return ERROR_RW;
263 if (fwrite (& img -> l_ght[i].fix, sizeof(int), 1, fp) != 1) return ERROR_RW;
264 if (fwrite (& img -> l_ght[i].show, sizeof(int), 1, fp) != 1) return ERROR_RW;
265 if (fwrite (& img -> l_ght[i].position, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
266 if (fwrite (& img -> l_ght[i].direction, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
267 if (fwrite (& img -> l_ght[i].intensity, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
268 if (fwrite (& img -> l_ght[i].attenuation, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
269 if (fwrite (& img -> l_ght[i].spot_data, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
270 }
271 if (fwrite (& img -> m_terial.predefine, sizeof(int), 1, fp) != 1) return ERROR_RW;
272 if (fwrite (& img -> m_terial.albedo, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
273 if (fwrite (img -> m_terial.param, sizeof(GLfloat), 6, fp) != 6) return ERROR_RW;
274 if (fwrite (& img -> f_g.mode, sizeof(int), 1, fp) != 1) return ERROR_RW;
275 if (fwrite (& img -> f_g.based, sizeof(int), 1, fp) != 1) return ERROR_RW;
276 if (fwrite (& img -> f_g.density, sizeof(float), 1, fp) != 1) return ERROR_RW;
277 if (fwrite (img -> f_g.depth, sizeof(float), 2, fp) != 2) return ERROR_RW;
278 if (fwrite (& img -> f_g.color, sizeof(vec3_t), 1, fp) != 1) return ERROR_RW;
279
280 if (fwrite (& img -> filled_type, sizeof(int), 1, fp) != 1) return ERROR_RW;
281 if (fwrite (& img -> step, sizeof(int), 1, fp) != 1) return ERROR_RW;
282 if (fwrite (& img -> rep, sizeof(int), 1, fp) != 1) return ERROR_RW;
283 for (i=0; i<4; i++)
284 {
285 if (i < 2)
286 {
287 for (j=0; j<sid; j++)
288 {
289 if (fwrite (img -> spcolor[i][j], sizeof(ColRGBA), this_proj -> coord -> ntg[i][j], fp) != this_proj -> coord -> ntg[i][j]) return ERROR_RW;
290 }
291 }
292 else
293 {
294 j = (this_proj -> modelgl -> adv_bonding[i-2] && this_proj -> coord -> totcoord[i]) ? this_proj -> coord -> totcoord[i] : 0;
295 if (fwrite (& j, sizeof(int), 1, fp) != 1) return ERROR_RW;
296 if (j)
297 {
298 if (fwrite (img -> spcolor[i][0], sizeof(ColRGBA), this_proj -> coord -> totcoord[i], fp) != this_proj -> coord -> totcoord[i]) return ERROR_RW;
299 }
300 }
301 }
302 if (fwrite (& this_proj -> modelgl -> rings, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
303 if (this_proj -> modelgl -> rings)
304 {
305 for (i=0; i<5; i++)
306 {
307 if (save_rings_chains_data (fp, 0, this_proj -> rsparam[i][1], this_proj -> steps,
308 this_proj -> modelgl -> ring_max[i],
309 this_proj -> modelgl -> num_rings[i],
310 this_proj -> modelgl -> show_rpoly[i],
311 this_proj -> modelgl -> all_rings[i]) != OK) return ERROR_RINGS;
312 }
313 }
314 if (fwrite (& this_proj -> modelgl -> chains, sizeof(gboolean), 1, fp) != 1) return ERROR_RW;
315 if (this_proj -> modelgl -> chains)
316 {
317 if (save_rings_chains_data (fp, 1, this_proj -> csparam[5], this_proj -> steps,
318 this_proj -> modelgl -> chain_max,
319 this_proj -> modelgl -> num_chains,
320 NULL,
321 this_proj -> modelgl -> all_chains) != OK) return ERROR_CHAINS;
322 }
323 if (this_proj -> modelgl -> volumes)
324 {
325 i = 1;
326 if (fwrite (& i, sizeof(int), 1, fp) != 1) return ERROR_RW;
327 for (i=0; i<FILLED_STYLES; i++)
328 {
329 if (fwrite (this_proj -> modelgl -> atoms_volume[i], sizeof(double), this_proj -> steps, fp) != this_proj -> steps) return ERROR_RW;
330 if (fwrite (this_proj -> modelgl -> atoms_ppvolume[i], sizeof(double), this_proj -> steps, fp) != this_proj -> steps) return ERROR_RW;
331 for (j=0; j<this_proj -> steps; j++)
332 {
333 if (fwrite (this_proj -> modelgl -> volume_box[i][j], sizeof(double), 9, fp) != 9) return ERROR_RW;
334 }
335 }
336 if (fwrite (this_proj -> modelgl -> comp_vol, sizeof(gboolean), FILLED_STYLES, fp) != FILLED_STYLES) return ERROR_RW;
337 if (fwrite (img -> show_vol, sizeof(gboolean), FILLED_STYLES, fp) != FILLED_STYLES) return ERROR_RW;
338 if (fwrite (img -> vol_col, sizeof(ColRGBA), FILLED_STYLES, fp) != FILLED_STYLES) return ERROR_RW;
339 if (this_proj -> modelgl -> adv_bonding[0])
340 {
341 if (fwrite (& this_proj -> coord -> totcoord[2], sizeof(int), 1, fp) != 1) return ERROR_RW;
342 for (i=0; i<FILLED_STYLES; i++)
343 {
344 j = 0;
345 for (k=0; k<this_proj -> steps; k++)
346 {
347 for (l=0; l<this_proj -> coord -> totcoord[2]; l++)
348 {
349 if (this_proj -> modelgl -> fm_comp_vol[0][i][k][l]) j++;
350 }
351 }
352 if (fwrite (& j, sizeof(int), 1, fp) != 1) return ERROR_RW;
353 if (j)
354 {
355 for (k=0; k<this_proj -> steps; k++)
356 {
357 for (l=0; l<this_proj -> coord -> totcoord[2]; l++)
358 {
359 if (this_proj -> modelgl -> fm_comp_vol[0][i][k][l])
360 {
361 if (fwrite (& k, sizeof(int), 1, fp) != 1) return ERROR_RW;
362 if (fwrite (& l, sizeof(int), 1, fp) != 1) return ERROR_RW;
363 if (fwrite (& this_proj -> modelgl -> frag_mol_ppvolume[0][i][k][l], sizeof(double), 1, fp) != 1) return ERROR_RW;
364 if (fwrite (this_proj -> modelgl -> frag_box[i][k][l], sizeof(double), 9, fp) != 9) return ERROR_RW;
365 }
366 }
367 }
368 if (fwrite (img -> fm_show_vol[0][i], sizeof(gboolean), this_proj -> coord -> totcoord[2], fp) != this_proj -> coord -> totcoord[2]) return ERROR_RW;
369 if (fwrite (img -> fm_vol_col[0][i], sizeof(ColRGBA), this_proj -> coord -> totcoord[2], fp) != this_proj -> coord -> totcoord[2]) return ERROR_RW;
370 }
371 }
372 if (this_proj -> modelgl -> adv_bonding[1])
373 {
374 if (fwrite (& this_proj -> coord -> totcoord[3], sizeof(int), 1, fp) != 1) return ERROR_RW;
375 for (i=0; i<FILLED_STYLES; i++)
376 {
377 j = 0;
378 for (k=0; k<this_proj -> steps; k++)
379 {
380 for (l=0; l<this_proj -> coord -> totcoord[3]; l++)
381 {
382 if (this_proj -> modelgl -> fm_comp_vol[1][i][k][l]) j++;
383 }
384 }
385 if (fwrite (& j, sizeof(int), 1, fp) != 1) return ERROR_RW;
386 if (j)
387 {
388 for (k=0; k<this_proj -> steps; k++)
389 {
390 for (l=0; l<this_proj -> coord -> totcoord[3]; l++)
391 {
392 if (this_proj -> modelgl -> fm_comp_vol[1][i][k][l])
393 {
394 if (fwrite (& k, sizeof(int), 1, fp) != 1) return ERROR_RW;
395 if (fwrite (& l, sizeof(int), 1, fp) != 1) return ERROR_RW;
396 if (fwrite (& this_proj -> modelgl -> frag_mol_ppvolume[1][i][k][l], sizeof(double), 1, fp) != 1) return ERROR_RW;
397 }
398 }
399 }
400 if (fwrite (img -> fm_show_vol[1][i], sizeof(gboolean), this_proj -> coord -> totcoord[3], fp) != this_proj -> coord -> totcoord[3]) return ERROR_RW;
401 if (fwrite (img -> fm_vol_col[1][i], sizeof(ColRGBA), this_proj -> coord -> totcoord[3], fp) != this_proj -> coord -> totcoord[3]) return ERROR_RW;
402 }
403 }
404 }
405 else
406 {
407 i = 0;
408 if (fwrite (& i, sizeof(int), 1, fp) != 1) return ERROR_RW;
409 }
410 }
411 else
412 {
413 i = 0;
414 if (fwrite (& i, sizeof(int), 1, fp) != 1) return ERROR_RW;
415 }
416 }
417 else
418 {
419 i = 0;
420 if (fwrite (& i, sizeof(int), 1, fp) != 1) return ERROR_RW;
421 }
422
423 for (i=0; i<this_proj -> steps; i++)
424 {
425 for (j=0; j< this_proj -> natomes; j++)
426 {
427 if (save_atom_b (fp, this_proj, i, j) != OK) return ERROR_ATOM_B;
428 }
429 }
430
431 // Finally selection lists, bonds, angles and dihedrals
432 for (i=0; i<2; i++)
433 {
434 if (fwrite (& img -> selected[i] -> selected, sizeof(int), 1, fp) != 1) return ERROR_RW;
435 if (img -> selected[i] -> selected)
436 {
437 atom_in_selection * at = img -> selected[i] -> first;
438 for (j=0; j<img -> selected[i] -> selected; j++)
439 {
440 if (fwrite (& at -> id, sizeof(int), 1, fp) != 1) return ERROR_RW;
441 if (at -> next) at = at -> next;
442 }
443 if (img -> selected[i] -> selected >= 2 && img -> selected[i] -> selected <= 20)
444 {
445 j = num_bonds (img -> selected[i] -> selected);
446 if (fwrite (img -> selected[i] -> selected_bonds, sizeof(int), j, fp) != j) return ERROR_RW;
447 if (img -> selected[i] -> selected >= 3)
448 {
449 j = num_angles (img -> selected[i] -> selected);
450 if (fwrite (img -> selected[i] -> selected_angles, sizeof(int), j, fp) != j) return ERROR_RW;
451 if (img -> selected[i] -> selected >= 4 && img -> selected[i] -> selected <= 10)
452 {
453 j = num_dihedrals (img -> selected[i] -> selected);
454 if (fwrite (img -> selected[i] -> selected_dihedrals, sizeof(int), j, fp) != j) return ERROR_RW;
455 }
456 }
457 }
458 }
459 }
460
461 return OK;
462}
int num_bonds(int i)
number of distinct pair(s) of atoms in selection
Definition selection.c:183
int num_dihedrals(int i)
number of distinct quadruplet(s) of atoms in selection
Definition selection.c:207
int num_angles(int i)
number of distinct triplet(s) of atoms in selection
Definition selection.c:195
integer function chains()
Definition chains.F90:54
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
int atoms[NUM_STYLES][2]
float val
Definition dlp_init.c:117
dint rep
Definition dlp_edit.c:2239
field_object_match ** all_data[10]
FILE * fp
Global variable declarations Global convenience function declarations Global data structure defin...
#define ERROR_CHAINS
Definition global.h:262
#define ERROR_ATOM_B
Definition global.h:257
#define ERROR_RW
Definition global.h:252
#define ERROR_RINGS
Definition global.h:261
#define OK
Definition global.h:251
void zoom(glwin *view, int delta)
zoom in or zoom out in the OpenGL window
Definition glview.c:1003
render
Definition glview.h:182
int step
Definition ogl_draw.c:70
Variable declarations related the OpenGL window Data structure declarations related the OpenGL wind...
#define FILLED_STYLES
Definition glwin.h:105
G_MODULE_EXPORT void cloned_poly(GtkWidget *widg, gpointer data)
cloned polyehdra callback - GTK3
Definition m_poly.c:181
position
Definition m_proj.c:47
double z
Definition ogl_draw.c:57
double y
Definition ogl_draw.c:57
double x
Definition ogl_draw.c:57
Function declarations for reading atomes project file Function declarations for saving atomes proje...
int save_this_string(FILE *fp, gchar *string)
save string to file
Definition save_p.c:49
int save_atom_b(FILE *fp, project *this_proj, int s, int a)
save atom data to file (b)
Definition save_opengl.c:76
int save_atom_a(FILE *fp, project *this_proj, int s, int a)
save atom data to file (a)
Definition save_opengl.c:54
int save_rings_chains_data(FILE *fp, int type, int size, int steps, int data_max, int **num_data, gboolean ***show, int ****all_data)
saving rings and chains statistics data to file
Definition save_opengl.c:98
int save_opengl_image(FILE *fp, project *this_proj, image *img, int sid)
save OpenGL image properties to file
Definition glwin.h:277
int a
Definition tab-1.c:95
GtkWidget * axis_title
Definition tab-4.c:101
GtkWidget * img
Definition workspace.c:70