Compare commits

...

2 Commits

2 changed files with 19 additions and 8 deletions

View File

@ -135,18 +135,30 @@ int write_one_arrow_vertex (int offset_vertex,
GLfloat arrow_tip_padding = (1 / max) / 10; GLfloat arrow_tip_padding = (1 / max) / 10;
switch(site){ switch(site){
case EAST: case WEST: case EAST:
graphics_write_vertex (vx + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding, vy, vz); graphics_write_vertex (vx + (site % 2 - 1) * (1 / max) - (site % 2 - 1) * arrow_tip_padding, vy, vz);
graphics_write_color (1.0f, 0.0f, 0.0f); graphics_write_color (1.0f, 0.0f, 0.0f);
break; break;
case ZENITH: case NADIR: case WEST:
graphics_write_vertex (vx, vy + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding, vz); graphics_write_vertex (vx + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding, vy, vz);
graphics_write_color (0.0f, 1.0f, 1.0f);
break;
case ZENITH:
graphics_write_vertex (vx, vy + (site % 2 - 1) * (1 / max) - (site % 2 - 1) * arrow_tip_padding, vz);
graphics_write_color(0.0f, 1.0f, 0.0f); graphics_write_color(0.0f, 1.0f, 0.0f);
break; break;
case SOUTH: case NORTH: case NADIR:
graphics_write_vertex (vx, vy, vz + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding); graphics_write_vertex (vx, vy + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding, vz);
graphics_write_color(1.0f, 0.0f, 1.0f);
break;
case SOUTH:
graphics_write_vertex (vx, vy, vz + (site % 2 - 1) * (1 / max) - (site % 2 - 1) * arrow_tip_padding);
graphics_write_color(0.0f, 0.0f, 1.0f); graphics_write_color(0.0f, 0.0f, 1.0f);
break; break;
case NORTH:
graphics_write_vertex (vx, vy, vz + (site % 2) * (1 / max) - (site % 2) * arrow_tip_padding);
graphics_write_color(1.0f, 1.0f, 0.0f);
break;
default: break; default: break;
} }

View File

@ -683,7 +683,7 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
int density_max = space_X * space_Y * space_Z; int density_max = space_X * space_Y * space_Z;
int max = fmax(space_X, space_Y); max = fmax(max, space_Z); int max = fmax(space_X, space_Y); max = fmax(max, space_Z);
int show_space_design = 1, print_arrows_data = 1; int show_space_design = 1, print_arrows_data = 0;
int load = 0, site = 0, x = 0, y = 0, z = 0; int load = 0, site = 0, x = 0, y = 0, z = 0;
int specif_arrows_nb = rand() % density_max / 3; int specif_arrows_nb = rand() % density_max / 3;
@ -775,4 +775,3 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
} }