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

Functions to prepare the OpenGL rendering for the axis. More...

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

Go to the source code of this file.

Functions

object_3ddraw_sphere (int quality)
 OpenGL 3D sphere object rendering.
 
object_3ddraw_cylinder (int quality, float ra, float rb)
 OpenGL 3D cylinder object rendering.
 
object_3ddraw_cylinder_cap (int quality, float rad, gboolean picked)
 OpenGL 3D cylinder cap object rendering.
 
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 setup_sphere_vertice (float *vertices, vec3_t pos, ColRGBA col, float rad, float alpha)
 fill the OpenGL data buffer for a atom (or clone) to render
 
void setup_cylinder_vertice (float *vertices, vec3_t pos_a, vec3_t pos_b, ColRGBA col, float rad, float alpha, float delta)
 fill the OpenGL data buffer for a cylinder bond (or clone bond) to render
 
void setup_cap_vertice (float *vertices, vec3_t pos_a, vec3_t pos_b, ColRGBA col, float rad, float alpha)
 fill the OpenGL data buffer for a cylinder cap bond (or clone bond) to render
 
void setup_triangles (float *vertices, vec3_t sa, vec3_t sb, vec3_t sc)
 setup triangle veertices
 
void clean_labels (int id)
 clean atomic label shaders
 
ColRGBA color_axis (int id)
 get axis color
 
mat4_t create_axis_matrices (int type)
 create axis OpenGL rendering matrices
 
void setup_arrow (float *vert, vec3_t a, vec3_t b, vec3_t c, vec3_t d, vec3_t e)
 setup axis 3D arrow rendering data
 
void init_axis_param ()
 initialize axis rendering parameters
 
void prepare_axis_data (float *vert_a, float *vert_b, float *vert_c)
 prepare axis OpenGL rendering data buffer
 
int create_axis_lists ()
 prepare axis OpenGL rendering
 

Variables

float poly_alpha
 
vec3_t centroid
 
ColRGBA pcol
 
float extra
 
float arrow_length
 
float axis_size
 
float axis_radius
 
float arrow_base
 
float label_pos
 

Detailed Description

Functions to prepare the OpenGL rendering for the axis.

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

Function Documentation

◆ clean_labels()

void clean_labels ( int id)
extern

clean atomic label shaders

Parameters
idlabel id

Definition at line 143 of file d_label.c.

◆ color_axis()

ColRGBA color_axis ( int id)

get axis color

Parameters
idaxis x (0), y(1) or z(2)

Definition at line 77 of file d_axis.c.

◆ create_axis_lists()

int create_axis_lists ( )

prepare axis OpenGL rendering

Definition at line 267 of file d_axis.c.

◆ create_axis_matrices()

mat4_t create_axis_matrices ( int type)

create axis OpenGL rendering matrices

Parameters
typeaxis type (standard: 0, atom edition viewer axis: 1)

Definition at line 101 of file d_axis.c.

◆ draw_cylinder()

object_3d * draw_cylinder ( int quality,
float ra,
float rb )
extern

OpenGL 3D cylinder object rendering.

Parameters
qualityOpenGL quality
racylinder radius at 1st side point
rbcylinder radius at 2nd side point

Definition at line 98 of file d_bonds.c.

◆ draw_cylinder_cap()

object_3d * draw_cylinder_cap ( int quality,
float rad,
gboolean picked )
extern

OpenGL 3D cylinder cap object rendering.

Parameters
qualityOpenGL quality
radcylinder radius
pickedis the bond selected (1) or not (0)

Definition at line 169 of file d_bonds.c.

◆ draw_sphere()

object_3d * draw_sphere ( int quality)
extern

OpenGL 3D sphere object rendering.

Parameters
qualityOpenGL quality

Definition at line 209 of file d_atoms.c.

◆ init_axis_param()

void init_axis_param ( )

initialize axis rendering parameters

Definition at line 195 of file d_axis.c.

◆ prepare_axis_data()

void prepare_axis_data ( float * vert_a,
float * vert_b,
float * vert_c )

prepare axis OpenGL rendering data buffer

Parameters
vert_aOpenGL buffer data to fill
vert_bOpenGL buffer data to fill
vert_cOpenGL buffer data to fill

Definition at line 221 of file d_axis.c.

◆ setup_arrow()

void setup_arrow ( float * vert,
vec3_t a,
vec3_t b,
vec3_t c,
vec3_t d,
vec3_t e )

setup axis 3D arrow rendering data

Parameters
vertthe OpenGL buffer data to fill
aposition vector a
bposition vector b
cposition vector c
dposition vector d
eposition vector e

Definition at line 180 of file d_axis.c.

◆ setup_cap_vertice()

void setup_cap_vertice ( float * vertices,
vec3_t pos_a,
vec3_t pos_b,
ColRGBA col,
float rad,
float alpha )
extern

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

Parameters
verticesthe OpenGL buffer to fill
pos_athe position vector
pos_bthe rotation vector
colthe color
radthe radius
alphathe opacity (atom: 1.0, clone: 0.5)

Definition at line 323 of file d_bonds.c.

◆ setup_cylinder_vertice()

void setup_cylinder_vertice ( float * vertices,
vec3_t pos_a,
vec3_t pos_b,
ColRGBA col,
float rad,
float alpha,
float delta )
extern

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

Parameters
verticesthe OpenGL buffer to fill
pos_a1st atom position
pos_b2nd atom position
colthe color
radthe radius
alphathe opacity (atom: 1.0, clone: 0.5)
deltaradius correction(s) if atom(s) are shown

Definition at line 291 of file d_bonds.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_sphere_vertice()

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

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

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

Definition at line 312 of file d_atoms.c.

◆ setup_triangles()

void setup_triangles ( float * vertices,
vec3_t sa,
vec3_t sb,
vec3_t sc )
extern

setup triangle veertices

Parameters
vertices
sa1st summit
sb2nd summit
sc3rd summit

Definition at line 126 of file d_poly.c.

Variable Documentation

◆ arrow_base

float arrow_base

Definition at line 67 of file d_axis.c.

◆ arrow_length

float arrow_length

Definition at line 64 of file d_axis.c.

◆ axis_radius

float axis_radius

Definition at line 66 of file d_axis.c.

◆ axis_size

float axis_size

Definition at line 65 of file d_axis.c.

◆ centroid

vec3_t centroid
extern

Definition at line 59 of file d_poly.c.

◆ extra

float extra
extern

◆ label_pos

float label_pos

Definition at line 68 of file d_axis.c.

◆ pcol

ColRGBA pcol
extern

Definition at line 60 of file d_poly.c.

◆ poly_alpha

float poly_alpha
extern

Definition at line 65 of file d_poly.c.