atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
d_measures.c File Reference

Functions to prepare the OpenGL rendering of the measure(s) More...

#include "global.h"
#include "glview.h"
+ Include dependency graph for d_measures.c:

Go to the source code of this file.

Functions

void setup_line_vertice (float *vertices, vec3_t pos, ColRGBA col, float alpha)
 fill the OpenGL data buffer for a line bond (or clone bond) to render
 
void unrotate_camera ()
 unrotate OpenGL camera
 
double arc_cos (double val)
 compute arc cosinus
 
ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
void fill_bond_model_row (int p, int a, int b, GtkTreeStore *store)
 fill bond tree store row
 
void fill_angle_model_row (int p, int a, int b, int c, GtkTreeStore *store)
 fill angle tree store row
 
void fill_dihedral_model_row (int p, int a, int b, int c, int d, GtkTreeStore *store)
 fill dihedral tree store row
 
int num_bonds (int i)
 number of distinct pair(s) of atoms in selection
 
int num_angles (int i)
 number of distinct triplet(s) of atoms in selection
 
int num_dihedrals (int i)
 number of distinct quadruplet(s) of atoms in selection
 
void clean_labels (int id)
 clean atomic label shaders
 
void draw_angle_label (atom *at, atom *bt, atom *ct, int pi)
 prepare an measured angle label OpenGL rendering
 
void set_measure_color (int selected, int id, int num)
 set measure color
 
void setup_this_measured_angle (int s, int sa, int sb, int sc, int pi)
 prepare measured angle to render
 
void angles_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured angles selection
 
void dihedrals_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured dihedrals selection
 
void draw_bond_label (atom *at, atom *bt, int pi)
 prepare a measured distance OpenGL rendering
 
void setup_this_measured_bond (int s, int sa, int sb, int pi)
 prepare measured distance to render
 
void bonds_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured distances selection
 
int prepare_measure_shaders (int type, int shaders)
 prepare measure OpenGL rendering
 
void create_measures_lists ()
 prepare measure(s) OpenGL rendering
 

Variables

int objects [3]
 
int * object_was_selected [3]
 
int ** tmp_object_id [3]
 
int type_of_measure
 
int measures_drawing
 
atom_in_selectiontmp_a
 
atom_in_selectiontmp_b
 
atom_in_selectiontmp_c
 
atom_in_selectiontmp_d
 
atomta
 
atomtb
 
atomtc
 
atomtd
 
atomte
 
atomtf
 
distance dist_ba
 
distance dist_bc
 
int * shift
 
double dist
 
object_3dmeasure
 
ColRGBA col
 
ColRGBA col_gdk
 

Detailed Description

Functions to prepare the OpenGL rendering of the measure(s)

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file d_measures.c.

Function Documentation

◆ angles_loop()

void angles_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )

do things for the measured angles selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save angles selection,
-1 = clean angles selection,
0 = prepare OpenGL buffer data analysis mode selection measure,
1 = prepare OpenGL buffer data edition mode selection measure,
2 = fill angles tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 204 of file d_measures.c.

◆ arc_cos()

double arc_cos ( double val)
extern

compute arc cosinus

Parameters
valthe angle

Definition at line 131 of file ogl_utils.c.

◆ bonds_loop()

void bonds_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )

do things for the measured distances selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save bonds selection
-1 = clean bonds selection
0 = prepare OpenGL buffer data analysis mode selection measure
1 = prepare OpenGL buffer data edition mode selection measure
2 = fill bonds distances tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 530 of file d_measures.c.

◆ clean_labels()

void clean_labels ( int id)
extern

clean atomic label shaders

Parameters
idlabel id

Definition at line 143 of file d_label.c.

◆ create_measures_lists()

void create_measures_lists ( )

prepare measure(s) OpenGL rendering

Definition at line 673 of file d_measures.c.

◆ dihedrals_loop()

void dihedrals_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )

do things for the measured dihedrals selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save dihedrals selection
-1 = clean dihedrals selection
0 = prepare OpenGL buffer data analysis mode selection measure
1 = prepare OpenGL buffer data edition mode selection measure
2 = fill dihedrals tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 319 of file d_measures.c.

◆ draw_angle_label()

void draw_angle_label ( atom * at,
atom * bt,
atom * ct,
int pi )

prepare an measured angle label OpenGL rendering

Parameters
at1st atom
bt2nd atom
ct3rd atom
pi0 = mouse analysis mode, 1 = mouse edition mode

Definition at line 90 of file d_measures.c.

◆ draw_bond_label()

void draw_bond_label ( atom * at,
atom * bt,
int pi )

prepare a measured distance OpenGL rendering

Parameters
at1st atom
bt2nd atom
pi0 = mouse analysis mode, 1 = mouse edition mode

Definition at line 438 of file d_measures.c.

◆ fill_angle_model_row()

void fill_angle_model_row ( int p,
int a,
int b,
int c,
GtkTreeStore * store )
extern

fill angle tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
c3rd atom id
storethe GtkTreeStore to fill

Definition at line 158 of file w_measures.c.

◆ fill_bond_model_row()

void fill_bond_model_row ( int p,
int a,
int b,
GtkTreeStore * store )
extern

fill bond tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
storethe GtkTreeStore to fill

Definition at line 109 of file w_measures.c.

◆ fill_dihedral_model_row()

void fill_dihedral_model_row ( int p,
int a,
int b,
int c,
int d,
GtkTreeStore * store )
extern

fill dihedral tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
c3rd atom id
d4th atom id
storethe GtkTreeStore to fill

Definition at line 213 of file w_measures.c.

◆ init_color()

ColRGBA init_color ( int id,
int numid )
extern

initialize color based id number over total number of elements

Parameters
idthe id number
numidthe total number of elements

Definition at line 81 of file initcoord.c.

◆ num_angles()

int num_angles ( int i)
extern

number of distinct triplet(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 195 of file selection.c.

◆ num_bonds()

int num_bonds ( int i)
extern

number of distinct pair(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 183 of file selection.c.

◆ num_dihedrals()

int num_dihedrals ( int i)
extern

number of distinct quadruplet(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 207 of file selection.c.

◆ prepare_measure_shaders()

int prepare_measure_shaders ( int type,
int shaders )

prepare measure OpenGL rendering

Parameters
typethe measure type (0 = distances, 1 = angles, 2 = dihedrals)
shadersthe shader id

Definition at line 608 of file d_measures.c.

◆ set_measure_color()

void set_measure_color ( int selected,
int id,
int num )

set measure color

Parameters
selectedtotal number of selected atom(s)
idmeasured element id number
numtotal number of measured element(s) in the list

Definition at line 117 of file d_measures.c.

◆ setup_line_vertice()

void setup_line_vertice ( float * vertices,
vec3_t pos,
ColRGBA col,
float alpha )
extern

fill the OpenGL data buffer for a line bond (or clone bond) to render

Parameters
verticesthe OpenGL buffer to fill
posthe position vector
colthe color
alphathe opacity (atom: 1.0, clone: 0.5)

Definition at line 265 of file d_bonds.c.

◆ setup_this_measured_angle()

void setup_this_measured_angle ( int s,
int sa,
int sb,
int sc,
int pi )

prepare measured angle to render

Parameters
smeasured line (0) or label (1)
sa1st atom
sb2nd atom
sc3rd atom
pi0 = mouse analysis mode, 1 = mouse edition mode

Definition at line 143 of file d_measures.c.

◆ setup_this_measured_bond()

void setup_this_measured_bond ( int s,
int sa,
int sb,
int pi )

prepare measured distance to render

Parameters
smeasured line (0) or label (1)
sa1st atom
sb2nd atom
pi0 = mouse analysis mode, 1 = mouse edition mode

Definition at line 474 of file d_measures.c.

◆ unrotate_camera()

void unrotate_camera ( )
extern

unrotate OpenGL camera

Definition at line 143 of file ogl_draw.c.

Variable Documentation

◆ col

ColRGBA col

Definition at line 77 of file d_measures.c.

◆ col_gdk

ColRGBA col_gdk

Definition at line 78 of file d_measures.c.

◆ dist

double dist

Definition at line 73 of file d_measures.c.

◆ dist_ba

distance dist_ba

Definition at line 71 of file d_measures.c.

◆ dist_bc

distance dist_bc

Definition at line 71 of file d_measures.c.

◆ measure

object_3d* measure

Definition at line 75 of file d_measures.c.

◆ measures_drawing

int measures_drawing

Definition at line 67 of file d_measures.c.

◆ object_was_selected

int* object_was_selected[3]
extern

Definition at line 213 of file selection.c.

◆ objects

int objects[3]
extern

Definition at line 212 of file selection.c.

◆ shift

int* shift

Definition at line 72 of file d_measures.c.

◆ ta

atom* ta

Definition at line 70 of file d_measures.c.

◆ tb

atom * tb

Definition at line 70 of file d_measures.c.

◆ tc

atom * tc

Definition at line 70 of file d_measures.c.

◆ td

atom * td

Definition at line 70 of file d_measures.c.

◆ te

atom * te

Definition at line 70 of file d_measures.c.

◆ tf

atom * tf

Definition at line 70 of file d_measures.c.

◆ tmp_a

Definition at line 69 of file d_measures.c.

◆ tmp_b

Definition at line 69 of file d_measures.c.

◆ tmp_c

Definition at line 69 of file d_measures.c.

◆ tmp_d

Definition at line 69 of file d_measures.c.

◆ tmp_object_id

int** tmp_object_id[3]
extern

Definition at line 214 of file selection.c.

◆ type_of_measure

int type_of_measure

Definition at line 66 of file d_measures.c.