gem-graph-client/doc/rtfm/man3/graphics.h.3

588 lines
11 KiB
Groff
Raw Normal View History

.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 "
.ti -1c
.RI "#define \fBFRAG_SHADER_FILE\fP 'src/shader\&.frag'"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
.ti -1c
.RI "#define \fBGL_TARGET_MAJOR_VERSION\fP 0"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
.ti -1c
.RI "#define \fBGL_TARGET_MINOR_VERSION\fP 4"
.br
2024-10-20 01:05:12 +02:00
.RI "phantom documentation "
.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 "
.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\&. "
.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 "
.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 "
.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 "
.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\&. "
.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 "
.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\&. "
.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\&. "
.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 "
.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 "
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIstack_id\fP gl_area, ptr to the gl_area widget
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIr\fP
.br
\fIg\fP
.br
\fIb\fP
.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
\fBParameters\fP
.RS 4
\fIstack_id\fP
.br
\fIr\fP
.br
\fIg\fP
.br
\fIb\fP
.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
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIoffset_vertex\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
l
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
l
.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
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIcoords\fP GLuint (a,b)
.br
\fIgraphics_stack_id\fP
.br
\fIa\fP
.br
\fIb\fP
.br
\fIstack_id\fP
.br
\fIa\fP
.br
\fIb\fP
.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)"
.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\&.
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIoffset_vertex\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
.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)"
.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\&.
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIspace_X\fP
.br
\fIspace_Y\fP
.br
\fIspace_Z\fP
.br
\fIweight\fP
.br
\fIsite\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
.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
\fBParameters\fP
.RS 4
\fIcoords\fP GLuint (a,b,c)
2024-10-20 01:05:12 +02:00
.br
\fIgraphics_stack_id\fP
.br
\fIa\fP
.br
\fIb\fP
.br
\fIc\fP
.br
\fIstack_id\fP
.br
\fIa\fP
.br
\fIb\fP
.br
\fIc\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
\fBParameters\fP
.RS 4
\fIgraphics_stack_id\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
.RE
.PP
2024-10-20 01:05:12 +02:00
draw_space_ridges_lines
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIoffset_vertex\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
.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
\fBParameters\fP
.RS 4
\fIGLfloat\fP x, GLfloat y, GLfloat z
2024-10-20 01:05:12 +02:00
.br
\fIgraphics_stack_id\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console\&.
.PP
\fBParameters\fP
.RS 4
\fIstack_id\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
.SS "int graphics_init (void * error_buffer)"
.PP
Initializes a gl_area\&.
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fI*error_buffer\fP gl_area, ptr to the gl_area widget
.RE
.PP
\fBReturns\fP
.RS 4
true if initialized
.RE
.PP
\fBParameters\fP
.RS 4
\fI*error_buffer\fP
.RE
.PP
\fBReturns\fP
.RS 4
true if initialized
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgl_area,ptr\fP to the gl_area widget
.br
\fIgraphics_stack_id\fP gl_area, ptr to the gl_area widget
.br
\fIstack_id\fP
.RE
.PP
gl_area, ptr to the gl_area widget
.SS "bool graphics_init_shaders (const int stack_id)"
.PP
Initializes the shaders of a gl_area and link them to a program\&.
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP gl_area, ptr to the gl_area widget
.RE
.PP
\fBReturns\fP
.RS 4
true if initialized
.RE
.PP
\fBParameters\fP
.RS 4
\fIgl_area,ptr\fP to the gl_area widget
.RE
.PP
\fBReturns\fP
.RS 4
true if initialized
.RE
.PP
\fBParameters\fP
.RS 4
\fIstack_id\fP
.RE
.PP
gl_area, ptr to the gl_area widget
.PP
\fBReturns\fP
.RS 4
true if initialized
.RE
.PP
2024-10-20 01:05:12 +02:00
.SS "void graphics_model_setup (const int graphics_stack_id)"
.PP
2024-10-20 01:05:12 +02:00
graphics_model_setup
.PP
2024-10-20 01:05:12 +02:00
\fBParameters\fP
.RS 4
\fIgraphics_stack_id\fP
.RE
.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)"
.PP
2024-10-20 01:05:12 +02:00
set_arrow
.PP
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fIarrows_nb\fP
.br
\fIspace_X\fP
.br
\fIspace_Y\fP
.br
\fIspace_Z\fP
.br
\fIrequested_weight\fP
.br
\fIsite\fP
.br
\fIx\fP
.br
\fIy\fP
.br
\fIz\fP
.RE
.PP
\fBReturns\fP
.RS 4
2024-10-20 01:05:12 +02:00
i
.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
\fBParameters\fP
.RS 4
2024-10-20 01:05:12 +02:00
\fIgraphics_stack_id\fP
.br
\fI*error_buffer\fP
.RE
.PP
\fBReturns\fP
.RS 4
true if success
.RE
.PP
\fBParameters\fP
.RS 4
\fIgl_area,ptr\fP to the gl_area widget
.RE
.PP
\fBReturns\fP
.RS 4
true if success
.RE
.PP
\fBParameters\fP
.RS 4
\fIid\fP
.br
\fI*error_buffer\fP
.RE
.PP
gl_area, ptr to the gl_area widget
.PP
\fBReturns\fP
.RS 4
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\&.