gem-graph-client/include/arrows.h

115 lines
2.5 KiB
C
Raw Normal View History

/*
* Gem-graph OpenGL experiments
*
* Desc: OpenGL utils header
*
* Copyright (C) 2023 Jean Sirmai <jean@a-lec.org>
* Copyright (C) 2023 Adrien Bourmault <neox@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/>.
*/
#pragma once
#include <unistd.h>
#include <stdbool.h>
#include <GL/glu.h>
/*
* Writes basis and tip for all arrows into vertex and color buffers
*
* @param dimensions (x,y,z)
*
* @return void
*/
void arrows_write_terminations (long x, long y, long z);
/*
* Writes lines for arrow oriented to the east into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_east (long s, int weight, int site);
/*
* Writes lines for arrow oriented to the west into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_west (long s, int weight, int site);
/*
* Writes lines for arrow oriented to the zenith into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_zenith (long s, int weight, int site);
/*
* Writes lines for arrow oriented to the nadir into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_nadir (long s, int weight, int site);
/*
* Writes lines for arrow oriented to the south into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_south (long s, int weight, int site);
/*
* Writes lines for arrow oriented to the north into lines buffer
*
* @param s,
* weight,
* site
*
* @return void
*/
void write_arrow_lines_north (long s, int weight, int site);
/*
* Writes lines for arrow basis into lines buffer
*
* @param n,
* weight,
* site
*
* @return void
*/
void arrows_write_basis(long n);