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

OpenGL window drawing funcions. More...

#include "global.h"
#include "glview.h"
#include "dlp_field.h"
#include <time.h>
+ Include dependency graph for ogl_draw.c:

Go to the source code of this file.

Functions

ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
Lightcopy_light_sources (int dima, int dimb, Light *old_sp)
 create a copy of a list of light sources
 
atom_selectionduplicate_ogl_selection (atom_selection *old_sel)
 copy an atom selection
 
void create_atom_lists (gboolean to_pick)
 prepare atom(s) and clone(s) OpenGL rendering
 
int create_bond_lists (gboolean to_pick)
 prepare bond(s) and clone bond(s) OpenGL rendering
 
int create_selection_lists ()
 prepare the selected atom(s) and bond(s) OpenGL rendering
 
void create_poly_lists ()
 prepare coordination polyhedra(s) OpenGL rendering
 
void create_ring_lists ()
 prepare ring(s) polyhedra OpenGL rendering
 
int create_box_lists ()
 prepare box OpenGL rendering
 
int create_axis_lists ()
 prepare axis OpenGL rendering
 
int create_pick_lists ()
 prepare the picking list OpenGL rendering
 
int create_label_lists ()
 prepare atomic label(s) OpenGL rendering
 
void create_measures_lists ()
 prepare measure(s) OpenGL rendering
 
void create_light_lists ()
 prepare light(s) OpenGL rendering
 
void create_slab_lists (project *this_proj)
 prepare slab(s) OpenGL rendering
 
void create_volumes_lists ()
 prepare volume(s) OpenGL rendering
 
void print_matrices ()
 print OpenGL matrices
 
void setup_camera ()
 setup OpenGL camera
 
void unrotate_camera ()
 unrotate OpenGL camera
 
screen_stringduplicate_screen_string (screen_string *old_s)
 create a copy a screen_string data structure
 
void duplicate_material_and_lightning (image *new_img, image *old_img)
 copy the material and lightning parameters of an image data structure
 
imageduplicate_image (image *old_img)
 create a copy of an image data structure
 
void add_image ()
 add an image to the animation
 
void update_gl_pick_colors ()
 
atomduplicate_atom (atom *at)
 copy (partially) an atom data structure
 
void at_shift (atom *at, float *shift)
 modify atomic coordinates to display image in cell replica
 
void at_unshift (atom *at, float *shift)
 correct atomic coordinates modified to display image in cell replica
 
void draw (glwin *view)
 main drawing subroutine for the OpenGL window
 

Variables

double x
 
double y
 
double z
 
GLUquadricObj * quadric
 
glwinwingl
 
projectproj_gl
 
int proj_sp
 
int proj_at
 
coord_infocoord_gl
 
box_infobox_gl
 
cell_infocell_gl
 
imageplot
 
int qual
 
int acolorm
 
int pcolorm
 
int step
 
int nbs
 
int nbl
 

Detailed Description

OpenGL window drawing funcions.

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 ogl_draw.c.

Function Documentation

◆ add_image()

void add_image ( )

add an image to the animation

Definition at line 362 of file ogl_draw.c.

◆ at_shift()

void at_shift ( atom * at,
float * shift )

modify atomic coordinates to display image in cell replica

Parameters
atthe atom
shiftthe shift to apply

Definition at line 432 of file ogl_draw.c.

◆ at_unshift()

void at_unshift ( atom * at,
float * shift )

correct atomic coordinates modified to display image in cell replica

Parameters
atthe atom
shiftthe shift to correct

Definition at line 447 of file ogl_draw.c.

◆ copy_light_sources()

Light * copy_light_sources ( int dima,
int dimb,
Light * old_sp )
extern

create a copy of a list of light sources

Parameters
dimanew list size
dimbold list size to duplicate
old_spold light sources

Definition at line 391 of file w_advance.c.

◆ create_atom_lists()

void create_atom_lists ( gboolean to_pick)
extern

prepare atom(s) and clone(s) OpenGL rendering

Parameters
to_pickto pick (1) or to draw (0)

Definition at line 610 of file d_atoms.c.

◆ create_axis_lists()

int create_axis_lists ( )
extern

prepare axis OpenGL rendering

Definition at line 268 of file d_axis.c.

◆ create_bond_lists()

int create_bond_lists ( gboolean to_pick)
extern

prepare bond(s) and clone bond(s) OpenGL rendering

Parameters
to_pickto pick (1) or to draw (0)

Definition at line 670 of file d_bonds.c.

◆ create_box_lists()

int create_box_lists ( )
extern

prepare box OpenGL rendering

Definition at line 290 of file d_box.c.

◆ create_label_lists()

int create_label_lists ( )
extern

prepare atomic label(s) OpenGL rendering

Definition at line 157 of file d_label.c.

◆ create_light_lists()

void create_light_lists ( )
extern

prepare light(s) OpenGL rendering

Definition at line 467 of file d_box.c.

◆ create_measures_lists()

void create_measures_lists ( )
extern

prepare measure(s) OpenGL rendering

Definition at line 673 of file d_measures.c.

◆ create_pick_lists()

int create_pick_lists ( )
extern

prepare the picking list OpenGL rendering

Definition at line 940 of file d_selection.c.

◆ create_poly_lists()

void create_poly_lists ( )
extern

prepare coordination polyhedra(s) OpenGL rendering

Definition at line 630 of file d_poly.c.

◆ create_ring_lists()

void create_ring_lists ( )
extern

prepare ring(s) polyhedra OpenGL rendering

Definition at line 169 of file d_rings.c.

◆ create_selection_lists()

int create_selection_lists ( )
extern

prepare the selected atom(s) and bond(s) OpenGL rendering

Definition at line 872 of file d_selection.c.

◆ create_slab_lists()

void create_slab_lists ( project * this_proj)
extern

prepare slab(s) OpenGL rendering

Parameters
this_projthe target project

Definition at line 898 of file d_box.c.

◆ create_volumes_lists()

void create_volumes_lists ( )
extern

prepare volume(s) OpenGL rendering

Definition at line 939 of file d_box.c.

◆ draw()

void draw ( glwin * view)

main drawing subroutine for the OpenGL window

Parameters
viewthe target glwin

Definition at line 461 of file ogl_draw.c.

◆ duplicate_atom()

atom * duplicate_atom ( atom * at)

copy (partially) an atom data structure

Parameters
atthe atom to copy

Definition at line 396 of file ogl_draw.c.

◆ duplicate_image()

image * duplicate_image ( image * old_img)

create a copy of an image data structure

Parameters
old_imgthe image to copy

Definition at line 204 of file ogl_draw.c.

◆ duplicate_material_and_lightning()

void duplicate_material_and_lightning ( image * new_img,
image * old_img )

copy the material and lightning parameters of an image data structure

Parameters
new_imgthe new image
old_imgthe old image with the data to be copied

Definition at line 180 of file ogl_draw.c.

◆ duplicate_ogl_selection()

atom_selection * duplicate_ogl_selection ( atom_selection * old_sel)
extern

copy an atom selection

Parameters
old_selthe atom selection to copy

Definition at line 119 of file calc.c.

◆ duplicate_screen_string()

screen_string * duplicate_screen_string ( screen_string * old_s)

create a copy a screen_string data structure

Parameters
old_sthe data structure to be copied

Definition at line 158 of file ogl_draw.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.

◆ print_matrices()

void print_matrices ( )

print OpenGL matrices

Definition at line 92 of file ogl_draw.c.

◆ setup_camera()

void setup_camera ( )

setup OpenGL camera

Definition at line 120 of file ogl_draw.c.

◆ unrotate_camera()

void unrotate_camera ( )

unrotate OpenGL camera

Definition at line 143 of file ogl_draw.c.

◆ update_gl_pick_colors()

void update_gl_pick_colors ( )
extern

Variable Documentation

◆ acolorm

int acolorm

Definition at line 68 of file ogl_draw.c.

◆ box_gl

box_info* box_gl

Definition at line 64 of file ogl_draw.c.

◆ cell_gl

cell_info* cell_gl

Definition at line 65 of file ogl_draw.c.

◆ coord_gl

coord_info* coord_gl

Definition at line 63 of file ogl_draw.c.

◆ nbl

int nbl

Definition at line 72 of file ogl_draw.c.

◆ nbs

int nbs
extern

Definition at line 176 of file d_atoms.c.

◆ pcolorm

int pcolorm

Definition at line 69 of file ogl_draw.c.

◆ plot

image* plot

Definition at line 66 of file ogl_draw.c.

◆ proj_at

int proj_at

Definition at line 62 of file ogl_draw.c.

◆ proj_gl

project* proj_gl

Definition at line 60 of file ogl_draw.c.

◆ proj_sp

int proj_sp

Definition at line 61 of file ogl_draw.c.

◆ quadric

GLUquadricObj* quadric

Definition at line 58 of file ogl_draw.c.

◆ qual

int qual

Definition at line 67 of file ogl_draw.c.

◆ step

int step

Definition at line 70 of file ogl_draw.c.

◆ wingl

glwin* wingl

Definition at line 59 of file ogl_draw.c.

◆ x

double x

Definition at line 57 of file ogl_draw.c.

◆ y

double y

Definition at line 57 of file ogl_draw.c.

◆ z

double z

Definition at line 57 of file ogl_draw.c.