WIP: Maintenant, on sait écrire des flèches où on veut, quand on veut.
This commit is contained in:
parent
4d6ba3951a
commit
f4a49ea72c
Binary file not shown.
After Width: | Height: | Size: 122 KiB |
|
@ -444,64 +444,64 @@ static bool draw_line (GLuint *lines_origin, int a, int b)
|
|||
*(lines_origin + lines_index) = b; lines_index ++;
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_0(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_East(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 2, s + site + x * 12 + 6);
|
||||
draw_line (lines_origin, s + site + x * 12 + 3, s + site + x * 12 + 6);
|
||||
draw_line (lines_origin, s + 2, s + 6);
|
||||
draw_line (lines_origin, s + 3, s + 6);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 4, s + site + x * 12 + 6);
|
||||
draw_line (lines_origin, s + site + x * 12 + 5, s + site + x * 12 + 6);
|
||||
draw_line (lines_origin, s + 4, s + 6);
|
||||
draw_line (lines_origin, s + 5, s + 6);
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_1(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_West(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 2, s + site + x * 12 + 7);
|
||||
draw_line (lines_origin, s + site + x * 12 + 3, s + site + x * 12 + 7);
|
||||
draw_line (lines_origin, s + 2, s + 7);
|
||||
draw_line (lines_origin, s + 3, s + 7);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 4, s + site + x * 12 + 7);
|
||||
draw_line (lines_origin, s + site + x * 12 + 5, s + site + x * 12 + 7);
|
||||
draw_line (lines_origin, s + 4, s + 7);
|
||||
draw_line (lines_origin, s + 5, s + 7);
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_2(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_Zenith(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 0, s + site + x * 12 + 8);
|
||||
draw_line (lines_origin, s + site + x * 12 + 1, s + site + x * 12 + 8);
|
||||
draw_line (lines_origin, s + 0, s + 8);
|
||||
draw_line (lines_origin, s + 1, s + 8);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 4, s + site + x * 12 + 8);
|
||||
draw_line (lines_origin, s + site + x * 12 + 5, s + site + x * 12 + 8);
|
||||
draw_line (lines_origin, s + 4, s + 8);
|
||||
draw_line (lines_origin, s + 5, s + 8);
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_3(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_Nadir(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 0, s + site + x * 12 + 9);
|
||||
draw_line (lines_origin, s + site + x * 12 + 1, s + site + x * 12 + 9);
|
||||
draw_line (lines_origin, s + 0, s + 9);
|
||||
draw_line (lines_origin, s + 1, s + 9);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 4, s + site + x * 12 + 9);
|
||||
draw_line (lines_origin, s + site + x * 12 + 5, s + site + x * 12 + 9);
|
||||
draw_line (lines_origin, s + 4, s + 9);
|
||||
draw_line (lines_origin, s + 5, s + 9);
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_4(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_North(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 0, s + site + x * 12 + 10);
|
||||
draw_line (lines_origin, s + site + x * 12 + 1, s + site + x * 12 + 10);
|
||||
draw_line (lines_origin, s + 0, s + 10);
|
||||
draw_line (lines_origin, s + 1, s + 10);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 2, s + site + x * 12 + 10);
|
||||
draw_line (lines_origin, s + site + x * 12 + 3, s + site + x * 12 + 10);
|
||||
draw_line (lines_origin, s + 2, s + 10);
|
||||
draw_line (lines_origin, s + 3, s + 10);
|
||||
}
|
||||
|
||||
static bool draw_an_arrow_5(GLuint *lines_origin, long s, int weight, int site, int x, int y, int z)
|
||||
static bool draw_an_arrow_South(GLuint *lines_origin, long s, int weight, int site)
|
||||
{
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 0, s + site + x * 12 + 11);
|
||||
draw_line (lines_origin, s + site + x * 12 + 1, s + site + x * 12 + 11);
|
||||
draw_line (lines_origin, s + 0, s + 11);
|
||||
draw_line (lines_origin, s + 1, s + 11);
|
||||
|
||||
draw_line (lines_origin, s + site + x * 12 + 2, s + site + x * 12 + 11);
|
||||
draw_line (lines_origin, s + site + x * 12 + 3, s + site + x * 12 + 11);
|
||||
draw_line (lines_origin, s + 2, s + 11);
|
||||
draw_line (lines_origin, s + 3, s + 11);
|
||||
}
|
||||
|
||||
static bool draw_a_central_star(GLuint *lines_origin, long n)
|
||||
|
@ -518,13 +518,26 @@ static bool draw_some_arrows (GLuint *lines_origin,
|
|||
long stx = z * y, sty = z, stz = 1;
|
||||
long a = 0, b = 0, c = 0;
|
||||
|
||||
a = 0, b = 0, c = 0; draw_a_central_star(lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
a = 0, b = 0, c = 1; draw_a_central_star(lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
a = 1, b = 1, c = 1; draw_a_central_star(lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
a = 2, b = 2, c = 2; draw_a_central_star(lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
a = 0, b = 1, c = 0;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_East (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 1);
|
||||
a = 1, b = 1, c = 0;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_West (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 2);
|
||||
a = 1, b = 1, c = 1;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_Zenith(lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 3);
|
||||
a = 1, b = 2, c = 1;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_Nadir (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 4);
|
||||
a = 2, b = 2, c = 1;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_North (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 5);
|
||||
a = 2, b = 2, c = 2;
|
||||
draw_a_central_star (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c));
|
||||
draw_an_arrow_South (lines_origin, s + 1 + 12 * (stx * a + sty * b + stz * c), 1, 6);
|
||||
|
||||
/*
|
||||
draw_an_arrow_0(lines_origin, s, 1, 1, 0, 0, 0);
|
||||
draw_an_arrow_1(lines_origin, s, 1, 1, 0, 0, 0);
|
||||
draw_an_arrow_2(lines_origin, s, 1, 1, 0, 0, 0);
|
||||
draw_an_arrow_3(lines_origin, s, 1, 1, 0, 0, 0);
|
||||
|
|
|
@ -571,10 +571,10 @@ static void get_model_data_and_user_preferences(){
|
|||
model_space_size_z = 3; // 0 < model_space_size_z
|
||||
|
||||
// XXX ONLY space drawed, no arrows
|
||||
model_arrows_nb = 8; // assert : l'emplacement des flèches est contraint
|
||||
model_arrows_nb = 6; // assert : l'emplacement des flèches est contraint
|
||||
// par model_space_size_x, y, z et le nombre de sites
|
||||
// OLD ARROWS (DEPRECATED)
|
||||
nombre_de_cases_contenant_des_fleches = 4; // à calculer TODO
|
||||
nombre_de_cases_contenant_des_fleches = 6; // à calculer TODO
|
||||
|
||||
// pref_1D_shown_as_3D_xor_2D_space = 0; // 0 = 3D 1 = 2D
|
||||
// pref_1D_shown_as_3D_xor_2D_arrows = 0; // 0 = 3D 1 = 2D
|
||||
|
|
Loading…
Reference in New Issue