WIP: va falloir remettre ça en ordre ! mais, au moins, c'est symétrique.
This commit is contained in:
parent
6a7492e935
commit
57df848820
|
@ -426,7 +426,7 @@ static void draw_central_stars_in_neighbooring_cubes(GLuint *lines_origin,
|
|||
int space_X, int space_Y, int space_Z, int step_x, int step_y)
|
||||
{
|
||||
|
||||
float r = 0.0f;
|
||||
float r = 0.0f, limit = 1.1f;
|
||||
int nb_in_neighborhood = 0;
|
||||
int s = space_X * space_Y * space_Z / 2;
|
||||
// int z = space_Z;
|
||||
|
@ -438,7 +438,7 @@ static void draw_central_stars_in_neighbooring_cubes(GLuint *lines_origin,
|
|||
for (int k = 0; k < space_Z; k++){
|
||||
if (D && (k == 0 && j == space_X - 1)) printf(" ");
|
||||
r = radius(i, j, k, space_X, space_Y, space_Z);
|
||||
if (r < 1.1f){ // 2.5f
|
||||
if (r < limit){ // 2.5f
|
||||
if (D) printf("%6.3f (%d,%d,%d) ", r, i, j, k);
|
||||
draw_a_central_star(lines_origin, s + (i * step_x + j * step_y + k) * 6 + 10);
|
||||
/* printf("buffers : (444) n = %d i * step_x + j * step_y + k = %d 125 / 2 = %d\n",\
|
||||
|
@ -451,7 +451,8 @@ static void draw_central_stars_in_neighbooring_cubes(GLuint *lines_origin,
|
|||
}
|
||||
if (D) printf("\n ");
|
||||
}
|
||||
printf("buffers : nb_in_neighborhood = %d/%d ", nb_in_neighborhood, s * 2 + 1);
|
||||
printf("buffers : neighborhood size = %d/%d with limit = %3.1f space units ",\
|
||||
nb_in_neighborhood, s * 2 + 1, limit);
|
||||
}
|
||||
|
||||
// I'm standing on Earth (any planet or star or spinning spheroid, in fact)
|
||||
|
@ -489,9 +490,9 @@ bool compute_space(int space_X, int space_Y, int space_Z,
|
|||
if ((space_X == space_Y) && (space_X == space_Z)) CUBE = 1;
|
||||
if (CUBE) side_size = space_X; /* IF IT IS A CUBE, space_x = space_y = space_z */
|
||||
if (1) draw_central_stars_in_neighbooring_cubes(lines_origin, space_X, space_Y, space_Z, step_x, step_y);
|
||||
if (CUBE) draw_a_central_central_star (lines_origin, s, side_size);
|
||||
if (CUBE) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, s, side_size);
|
||||
if (CUBE) draw_3_x_4_around_6_poles (lines_origin, s, side_size);
|
||||
if (0 && CUBE) draw_a_central_central_star (lines_origin, s, side_size);
|
||||
if (0 && CUBE) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, s, side_size);
|
||||
if (0 && CUBE) draw_3_x_4_around_6_poles (lines_origin, s, side_size);
|
||||
printf("space (%d x %d x %d) steps [ %d | %d | %d ]",\
|
||||
space_X, space_Y, space_Z, (space_Z + 1) * (space_Y + 1), space_Z + 1, 1);
|
||||
if (pref_test_diagonal) diagonal_test (space_X, space_Y, space_Z, step_x, step_y, step_z, lines_origin);
|
||||
|
|
|
@ -563,8 +563,8 @@ static void get_model_data_and_user_preferences(){
|
|||
// par space_size_x, y, z et le nombre de sites
|
||||
// >>> assert TODO
|
||||
pref_central_stars_nb = cubes_nb; // cubes_nb = max = space_X * space_Y * space_Z
|
||||
pref_central_stars_nb = 0; // 1 + 6 + 24;
|
||||
pref_central_stars_nb = 1;
|
||||
pref_central_stars_nb = 1 + 6 + 24;
|
||||
pref_central_stars_nb = 1 + 6;
|
||||
pref_test_diagonal = 1;
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ static void compute_buffers_sizes(int space_X, int space_Y, int space_Z,
|
|||
|
||||
buffer_lines_size += 6 * pref_central_stars_nb; // test central stars
|
||||
|
||||
// buffer_lines_size -= 2; // == TESTS LINES BUFFER SIZE ON THE DIAGONAL
|
||||
buffer_lines_size -= 2; // == TESTS LINES BUFFER SIZE ON THE DIAGONAL
|
||||
|
||||
if (0) printf("allocated buffers sizes :%4d/3 = %3d vertices, %4d/3 = %3d colors,\
|
||||
%4d/2 = %3d lines, %4d/3 = %3d plans.\n",
|
||||
|
|
Loading…
Reference in New Issue