gem-graph-client/include/displays.h

78 lines
3.3 KiB
C

/*
* Gem-graph OpenGL experiments
*
* Desc: GL functions
*
* Copyright (C) 2023 Adrien Bourmault <neox@a-lec.org>
* Copyright (C) 2023 Jean Sirmai <jean@a-lec.org>
*
* This file is part of Gem-graph.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <time.h>
/*
* Prints the arrows[] array
*
* For each arrow the following parameters are displayed :
* - rank in the array
* - weight (or load)
* - coordinates in space (site, x, y, z)
*/
void show_arrows_array_head(int one_batch_size, long nb_batches_specified, int verbose);
void show_one_arrow_in_array(struct arrow_t *arrows, int i);
void show_empty_arrows_array();
void show_arrows_array (struct arrow_t *arrows, int arrows_nb, int x, int y, int z);
void print_arrows_array (struct arrow_t *arrows, int arrows_nb, int invoked_by);
void print_user_action(struct arrow_t *arrows, int arrows_nb, int address, int requested_weight,
int current_weight, int site, int x, int y, int z);
void print_user_choices(struct arrow_t *arrows, int max_arrows_nb, int arrows_nb,
int space_size_x, int space_size_y, int space_size_z,
int show_array, int show_space_design);
void print_evolution (struct arrow_t *arrows, int arrows_nb, int modified, int deleted, int show_array);
/*
* Prints the initial user choices :
* - space dimension size and appearance (grids)
* - arrows[] array
* NB The space may be empty or saturated with arrows or any value in between
* To assert : Only one arrow per possible coordinates with a load max equal to ?
*/
void show_user_choices(long copy_nb_arrows_specified,
int space_size_x, int space_size_y, int space_size_z,
int prefer, int arbitrary, int one_batch_size);
/*
* Prints the result of the function set_arrow()
* and indicates the reasons of the choice (call) this function makes (see this function)
*/
void show_user_action(struct arrow_t *arrows, int arrows_nb, int address, int requested_weight,
int current_weight, int site, int x, int y, int z);
/*
* Prints vertex and lines buffers_states (sizes) at major one_batch_sizes and at the end of a session.
* Major one_batch_sizes are creation of grids and creation of arrows
* Arithmetic verification is provided at each one_batch_size
*/
void show_buffers_states(int space_X, int space_Y, int space_Z,
long nb_batches_specified, int one_batch_size,
int offset_after_grids, int buffer_vertex_size,
int buffer_lines_size_after_cubes, int buffer_lines_size);