2024-10-19 16:05:49 +02:00
.TH "include/graphics.h" 3 "Version 0.1.0" "Gem-graph" \" -*- nroff -*-
.ad l
.nh
.SH NAME
include/graphics.h \- graphics header
.SH SYNOPSIS
.br
.PP
\fC #include 'base\& .h'\fP
.br
\fC #include <epoxy/gl\& .h>\fP
.br
\fC #include <GL/glu\& .h>\fP
.br
.SS "Classes"
.in +1c
.ti -1c
.RI "struct \fBgraphics_stack_t\fP"
.br
.RI "Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas\&. "
.in -1c
.SS "Macros"
.in +1c
.ti -1c
.RI "#define \fBVERTEX_SHADER_FILE\fP 'src/shader\&.vert'"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBFRAG_SHADER_FILE\fP 'src/shader\&.frag'"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBGL_TARGET_MAJOR_VERSION\fP 0"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "#define \fBGL_TARGET_MINOR_VERSION\fP 4"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "bool \fBgraphics_render_stack\fP (GtkWidget *container_widget)"
.br
.RI "Structure describing a gl_area and its parameters, used to create a table of Gem-graph client current gl_areas\&. "
.ti -1c
.RI "bool \fBgraphics_setup_glarea\fP (int target_mode, GtkWidget *target_widget)"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_init\fP (void *error_buffer)"
.br
.RI "Initializes a gl_area\&. "
.ti -1c
.RI "void \fBgraphics_draw\fP (const int graphics_stack_id)"
.br
.RI "Draws the current buffer to a gl_area\&. "
.ti -1c
.RI "bool \fBgraphics_shutdown\fP (const int graphics_stack_id, void *error_buffer)"
.br
2024-10-20 01:05:12 +02:00
.RI "Shutdowns a gl_area\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "bool \fBgraphics_init_shaders\fP (const int graphics_stack_id)"
.br
.RI "Initializes the shaders of a gl_area and link them to a program\&. "
.ti -1c
.RI "bool \fBgraphics_init_graphics_stack\fP (void *container_widget, GError *error_buffer)"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "bool \fBgraphics_shutdown_graphics_stack\fP (void *container_widget, GError *error_buffer)"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "bool \fBgraphics_update_axis_stack\fP (GtkWidget *container_widget, int axis, int value)"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "void \fBgraphics_init_buffers\fP (const int graphics_stack_id)"
.br
.RI "Initializes the buffer of a gl_area Calls according to the user preferences\&. "
.ti -1c
.RI "void \fBgraphics_draw_vertex\fP (const int graphics_stack_id, GLfloat x, GLfloat y, GLfloat z)"
.br
.RI "Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
.ti -1c
.RI "void \fBgraphics_draw_line\fP (const int graphics_stack_id, GLuint a, GLuint b)"
.br
2024-10-20 01:05:12 +02:00
.RI "Writes values to describe a line from a to b into the line buffer\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "void \fBgraphics_draw_plan\fP (const int graphics_stack_id, GLuint a, GLuint b, GLuint c)"
.br
.RI "Writes values to describe an (a,b,c) plan (triangle) into the plan buffer\&. "
.ti -1c
.RI "void \fBgraphics_draw_color\fP (const int graphics_stack_id, GLfloat r, GLfloat g, GLfloat b)"
.br
.RI "Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\&. "
.ti -1c
.RI "void \fBgraphics_model_setup\fP (const int graphics_stack_id)"
.br
2024-10-20 01:05:12 +02:00
.RI "graphics_model_setup "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_one_arrow_vertex\fP (const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)"
.br
2024-10-20 01:05:12 +02:00
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_one_arrow_line\fP (const int graphics_stack_id, int offset_vertex)"
.br
2024-10-20 01:05:12 +02:00
.RI "Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\&. "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "int \fBgraphics_draw_space_ridges_vertex\fP (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
.br
.RI "Writes grid ridges to vertex and color buffers\&. "
.ti -1c
.RI "int \fBgraphics_draw_space_ridges_lines\fP (const int graphics_stack_id)"
.br
2024-10-20 01:05:12 +02:00
.RI "draw_space_ridges_lines "
2024-10-19 16:05:49 +02:00
.ti -1c
.RI "long \fBgraphics_draw_grids_on_space_faces_vertex\fP (const int graphics_stack_id, long x, long y, long z)"
.br
.RI "Writes grid lines on space faces\&. "
.ti -1c
.RI "long \fBgraphics_draw_grids_on_space_faces_lines\fP (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
.br
.RI "phantom documentation used to test the functioning of doxygen "
.ti -1c
.RI "int \fBgraphics_set_arrow\fP (int graphics_stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)"
.br
2024-10-20 01:05:12 +02:00
.RI "set_arrow "
2024-10-19 16:05:49 +02:00
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "struct \fBgraphics_stack_t\fP * \fBgraphics_stack\fP"
.br
.RI "Dynamic array of ptrs to dynamically allocated gl_area_entry\&. "
.in -1c
.SH "Detailed Description"
.PP
graphics header
This file is part of Gem-graph\& .
.SH "Function Documentation"
.PP
.SS "void graphics_draw (const int stack_id)"
.PP
Draws the current buffer to a gl_area\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI stack_id\fP gl_area, ptr to the gl_area widget
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "void graphics_draw_color (const int stack_id, GLfloat r, GLfloat g, GLfloat b)"
.PP
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI r\fP
.br
\fI g\fP
.br
\fI b\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console\& .
.PP
\fB Parameters\fP
2024-10-19 16:05:49 +02:00
.RS 4
2024-10-20 23:03:17 +02:00
\fI stack_id\fP
.br
\fI r\fP
.br
\fI g\fP
.br
\fI b\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "long graphics_draw_grids_on_space_faces_lines (const int graphics_stack_id, long offset_vertex, long x, long y, long z)"
.PP
phantom documentation used to test the functioning of doxygen
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
l
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "long graphics_draw_grids_on_space_faces_vertex (const int stack_id, long x, long y, long z)"
.PP
Writes grid lines on space faces\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
l
2024-10-19 16:05:49 +02:00
.RE
.PP
Writes grid lines on space faces\& .
.SS "void graphics_draw_line (const int stack_id, GLuint a, GLuint b)"
.PP
2024-10-20 01:05:12 +02:00
Writes values to describe a line from a to b into the line buffer\& . @use liste de fonctions GTK
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI coords\fP GLuint (a,b)
.br
\fI graphics_stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
.br
2024-10-20 23:03:17 +02:00
\fI stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "int graphics_draw_one_arrow_line (const int graphics_stack_id, int offset_vertex)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "int graphics_draw_one_arrow_vertex (const int graphics_stack_id, int space_X, int space_Y, int space_Z, int weight, int site, int x, int y, int z)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
Draws one arrow vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI space_X\fP
.br
\fI space_Y\fP
.br
\fI space_Z\fP
.br
\fI weight\fP
.br
\fI site\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "void graphics_draw_plan (const int stack_id, GLuint a, GLuint b, GLuint c)"
.PP
Writes values to describe an (a,b,c) plan (triangle) into the plan buffer\& .
.PP
\fB Parameters\fP
.RS 4
\fI coords\fP GLuint (a,b,c)
2024-10-20 01:05:12 +02:00
.br
\fI graphics_stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
.br
\fI c\fP
2024-10-20 23:03:17 +02:00
.br
\fI stack_id\fP
.br
\fI a\fP
.br
\fI b\fP
.br
\fI c\fP
2024-10-20 01:05:12 +02:00
.RE
.PP
.SS "int graphics_draw_space_ridges_lines (const int stack_id)"
.PP
draw_space_ridges_lines
.PP
\fB Parameters\fP
.RS 4
\fI graphics_stack_id\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
draw_space_ridges_lines
2024-10-19 16:05:49 +02:00
.SS "int graphics_draw_space_ridges_vertex (const int stack_id, long offset_vertex, long x, long y, long z)"
.PP
Writes grid ridges to vertex and color buffers\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI offset_vertex\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
Writes grid ridges to vertex and color buffers\& .
.SS "void graphics_draw_vertex (const int stack_id, GLfloat x, GLfloat y, GLfloat z)"
.PP
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
.PP
\fB Parameters\fP
.RS 4
\fI GLfloat\fP x, GLfloat y, GLfloat z
2024-10-20 01:05:12 +02:00
.br
\fI graphics_stack_id\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 23:03:17 +02:00
\fI stack_id\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "int graphics_init (void * error_buffer)"
.PP
Initializes a gl_area\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI *error_buffer\fP gl_area, ptr to the gl_area widget
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
true if initialized
.RE
.PP
\fB Parameters\fP
.RS 4
2024-10-20 23:03:17 +02:00
\fI *error_buffer\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 23:03:17 +02:00
true if initialized
2024-10-19 16:05:49 +02:00
.RE
.PP
.SS "void graphics_init_buffers (const int stack_id)"
.PP
Initializes the buffer of a gl_area Calls according to the user preferences\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI gl_area,ptr\fP to the gl_area widget
.br
\fI graphics_stack_id\fP gl_area, ptr to the gl_area widget
.br
2024-10-20 23:03:17 +02:00
\fI stack_id\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 23:03:17 +02:00
gl_area, ptr to the gl_area widget
2024-10-19 16:05:49 +02:00
.SS "bool graphics_init_shaders (const int stack_id)"
.PP
Initializes the shaders of a gl_area and link them to a program\& .
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP gl_area, ptr to the gl_area widget
.RE
.PP
\fB Returns\fP
.RS 4
true if initialized
.RE
.PP
\fB Parameters\fP
.RS 4
2024-10-19 16:05:49 +02:00
\fI gl_area,ptr\fP to the gl_area widget
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 23:03:17 +02:00
true if initialized
.RE
.PP
\fB Parameters\fP
.RS 4
\fI stack_id\fP
.RE
.PP
gl_area, ptr to the gl_area widget
.PP
\fB Returns\fP
.RS 4
2024-10-19 16:05:49 +02:00
true if initialized
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "void graphics_model_setup (const int graphics_stack_id)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
graphics_model_setup
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
\fB Parameters\fP
.RS 4
\fI graphics_stack_id\fP
.RE
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
.SS "int graphics_set_arrow (int graphics_stack_id, int arrows_nb, int space_X, int space_Y, int space_Z, int requested_weight, int site, int arrow_x, int arrow_y, int arrow_z)"
2024-10-19 16:05:49 +02:00
.PP
2024-10-20 01:05:12 +02:00
set_arrow
2024-10-19 16:05:49 +02:00
.PP
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI arrows_nb\fP
.br
\fI space_X\fP
.br
\fI space_Y\fP
.br
\fI space_Z\fP
.br
\fI requested_weight\fP
.br
\fI site\fP
.br
\fI x\fP
.br
\fI y\fP
.br
\fI z\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
2024-10-19 16:05:49 +02:00
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "bool graphics_shutdown (const int id, void * error_buffer)"
.PP
Shutdowns a gl_area\& .
.PP
2024-10-19 16:05:49 +02:00
\fB Parameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI graphics_stack_id\fP
.br
\fI *error_buffer\fP
2024-10-19 16:05:49 +02:00
.RE
.PP
\fB Returns\fP
.RS 4
true if success
.RE
.PP
\fB Parameters\fP
.RS 4
\fI gl_area,ptr\fP to the gl_area widget
.RE
.PP
\fB Returns\fP
.RS 4
2024-10-20 23:03:17 +02:00
true if success
.RE
.PP
\fB Parameters\fP
.RS 4
\fI id\fP
.br
\fI *error_buffer\fP
.RE
.PP
gl_area, ptr to the gl_area widget
.PP
\fB Returns\fP
.RS 4
2024-10-19 16:05:49 +02:00
true if success
.RE
.PP
.SH "Variable Documentation"
.PP
.SS "struct \fBgraphics_stack_t\fP* graphics_stack\fC [extern]\fP"
.PP
Dynamic array of ptrs to dynamically allocated gl_area_entry\& . Dynamic array of ptrs to dynamically allocated gl_area_entry\& .
.SH "Author"
.PP
Generated automatically by Doxygen for Gem-graph from the source code\& .