WIP: Bon. Ça reste mystérieux. Mais continuons...
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 42 KiB |
|
@ -569,11 +569,10 @@ static bool diagonal_test(long x, long y, long z,
|
||||||
long step_x, long step_y, long step_z,
|
long step_x, long step_y, long step_z,
|
||||||
GLuint *lines_origin)
|
GLuint *lines_origin)
|
||||||
{
|
{
|
||||||
// Je la déplace un peu pour chercher l'autre ligne ...
|
*(lines_origin + lines_index) = 0; lines_index ++;
|
||||||
*(lines_origin + lines_index) = step_z * 1 + step_y * 0 + step_x * 1; lines_index ++;
|
*(lines_origin + lines_index) = step_z * (z - 1)
|
||||||
*(lines_origin + lines_index) = step_z * (z - 2) + step_y * (y - 2) + step_x * (x - 1); lines_index ++;
|
+ step_y * (y - 1)
|
||||||
// *(lines_origin + lines_index) = step_z * 0 + step_y * 0 + step_x * 0; lines_index ++;
|
+ step_x * (x - 1); lines_index ++;
|
||||||
// *(lines_origin + lines_index) = step_z * (z - 1) + step_y * (y - 1) + step_x * (x - 1); lines_index ++;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,54 +651,9 @@ static bool arrows_anchors (long x, long y, long z,
|
||||||
colors_index += 3;
|
colors_index += 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
*(lines_origin + lines_index) = step_z * 0 + step_y * 0 + step_x * 0; lines_index ++;
|
|
||||||
*(lines_origin + lines_index) = step_z * (z - 1) + step_y * (y - 1) + step_x * (x - 1); lines_index ++;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool a_simple_test (long x, long y, long z,
|
|
||||||
long step_x, long step_y, long step_z,
|
|
||||||
GLfloat *vertex_origin,
|
|
||||||
GLfloat *colors_origin,
|
|
||||||
GLfloat *lines_origin)
|
|
||||||
{
|
|
||||||
/* *(vertex_origin + vertex_index + 0) = 0.5f; */
|
|
||||||
/* *(vertex_origin + vertex_index + 1) = 0.5f; */
|
|
||||||
/* *(vertex_origin + vertex_index + 2) = 0.5f; */
|
|
||||||
|
|
||||||
/* vertex_index += 3; */
|
|
||||||
|
|
||||||
/* *(vertex_origin + vertex_index + 0) = 0.4f; */
|
|
||||||
/* *(vertex_origin + vertex_index + 1) = 0.4f; */
|
|
||||||
/* *(vertex_origin + vertex_index + 2) = 0.4f; */
|
|
||||||
|
|
||||||
/* vertex_index += 3; */
|
|
||||||
|
|
||||||
/* *(colors_origin + colors_index + 0) = 1.0f; */
|
|
||||||
/* *(colors_origin + colors_index + 1) = 0.2f; */
|
|
||||||
/* *(colors_origin + colors_index + 2) = 0.0f; */
|
|
||||||
|
|
||||||
/* colors_index += 3; */
|
|
||||||
|
|
||||||
/* *(colors_origin + colors_index + 0) = 0.5f; */
|
|
||||||
/* *(colors_origin + colors_index + 1) = 0.3f; */
|
|
||||||
/* *(colors_origin + colors_index + 2) = 0.1f; */
|
|
||||||
|
|
||||||
/* colors_index += 3; */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Ça devrait me faire la diagonale test [0 - max] !
|
|
||||||
// B... !
|
|
||||||
*(lines_origin + lines_index) = step_z * 1 + step_y * 0 + step_x * 1; lines_index ++;
|
|
||||||
*(lines_origin + lines_index) = step_z * (z - 1) + step_y * (y - 1) + step_x * (x - 1); lines_index ++;
|
|
||||||
// *(lines_origin + lines_index) = step_z * 0 + step_y * 0 + step_x * 0; lines_index ++;
|
|
||||||
// *(lines_origin + lines_index) = step_z * (z - 1) + step_y * (y - 1) + step_x * (x - 1); lines_index ++;
|
|
||||||
// *(lines_origin + lines_index) = step_z * 1 + step_y * 1 + step_x * 1; lines_index ++;
|
|
||||||
// *(lines_origin + lines_index) = step_z * 2 + step_y * 2 + step_x * 2; lines_index ++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -759,6 +713,19 @@ static void show_user_choices(long model_size_x,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static bool a_simple_test (GLuint *lines_origin)
|
||||||
|
{
|
||||||
|
printf("lines_index = %ld lines_origin = %ld\n", lines_index, lines_origin);
|
||||||
|
*(lines_origin + lines_index) = 0; lines_index ++;
|
||||||
|
*(lines_origin + lines_index) = 50; lines_index ++;
|
||||||
|
}
|
||||||
|
|
||||||
bool compute_space_and_arrows(long model_size_x, long model_size_y, long model_size_z,
|
bool compute_space_and_arrows(long model_size_x, long model_size_y, long model_size_z,
|
||||||
|
|
||||||
GLuint *arrows, int model_arrows_nb,
|
GLuint *arrows, int model_arrows_nb,
|
||||||
|
@ -780,15 +747,16 @@ bool compute_space_and_arrows(long model_size_x, long model_size_y, long model_s
|
||||||
step_x = (model_size_z + 1) * (model_size_y + 1);
|
step_x = (model_size_z + 1) * (model_size_y + 1);
|
||||||
|
|
||||||
grids_intersections (model_size_x + 1, model_size_y + 1, model_size_z + 1, vertex_origin, colors_origin);
|
grids_intersections (model_size_x + 1, model_size_y + 1, model_size_z + 1, vertex_origin, colors_origin);
|
||||||
|
arrows_anchors (model_size_x, model_size_y, model_size_z, step_x,step_y, step_z,
|
||||||
|
vertex_origin, colors_origin, lines_origin);
|
||||||
|
|
||||||
draw_grids_3D (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin, pref_show_grid);
|
draw_grids_3D (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin, pref_show_grid);
|
||||||
// printf("pref_show_grid = %d\n", pref_show_grid);
|
|
||||||
if (pref_show_grid > 0) draw_ridges_3D (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin);
|
if (pref_show_grid > 0) draw_ridges_3D (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin);
|
||||||
if (pref_test_diagonal) diagonal_test (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin);
|
if (pref_test_diagonal) diagonal_test (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, lines_origin);
|
||||||
// a_simple_test (model_size_x + 1, model_size_y + 1, model_size_z + 1, step_x, step_y, step_z, vertex_origin, colors_origin, lines_origin);
|
|
||||||
*(lines_origin + lines_index) = step_z * 1 + step_y * 1 + step_x * 0; lines_index ++;
|
a_simple_test (lines_origin);
|
||||||
*(lines_origin + lines_index) = step_z * (model_size_z - 1)
|
printf("lines_index = %ld lines_origin = %ld\n", lines_index, lines_origin);
|
||||||
+ step_y * (model_size_y - 1)
|
|
||||||
+ step_x * (model_size_x); lines_index ++;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -801,3 +769,4 @@ bool compute_space_and_arrows(long model_size_x, long model_size_y, long model_s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -579,7 +579,7 @@ static void get_model_data_and_user_preferences(){
|
||||||
pref_mark_unit_space = 0; // 0 = no marks, 1 = 1st, 2 = last, 3 = both
|
pref_mark_unit_space = 0; // 0 = no marks, 1 = 1st, 2 = last, 3 = both
|
||||||
pref_style_lines_planes = 0; // 0 = arrows as lines, 1 = as planes, 2 = mix
|
pref_style_lines_planes = 0; // 0 = arrows as lines, 1 = as planes, 2 = mix
|
||||||
pref_style_mix_colors = 0; // TODO
|
pref_style_mix_colors = 0; // TODO
|
||||||
pref_show_grid = 1; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc
|
pref_show_grid = 0; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc
|
||||||
// xyz, 0, x, y, z, xy, xz, yz, xyz
|
// xyz, 0, x, y, z, xy, xz, yz, xyz
|
||||||
pref_test_diagonal = 1;
|
pref_test_diagonal = 1;
|
||||||
}
|
}
|
||||||
|
@ -616,7 +616,7 @@ static void compute_buffers_sizes(int model_space_size_x,
|
||||||
|
|
||||||
buffer_vertex_size = grids_intersections * 3; // 3 numbers per vertex
|
buffer_vertex_size = grids_intersections * 3; // 3 numbers per vertex
|
||||||
// + cubes_nb * (8 + 6) + 15 * model_arrows_nb;// OLD ARROWS (DEPRECATED)
|
// + cubes_nb * (8 + 6) + 15 * model_arrows_nb;// OLD ARROWS (DEPRECATED)
|
||||||
// buffer_vertex_size += arrows_anchors * 3;
|
buffer_vertex_size += arrows_anchors * 3;
|
||||||
|
|
||||||
|
|
||||||
buffer_colors_size = buffer_vertex_size;
|
buffer_colors_size = buffer_vertex_size;
|
||||||
|
|