Merge branch 'main' into experimental

This commit is contained in:
PedroEdiaz
2024-11-27 10:58:58 -06:00
10 changed files with 261 additions and 96 deletions

View File

@@ -9,6 +9,8 @@ unsigned char selected_axis = 0;
int window_width;
int window_height;
unsigned char animate_index=0;
versor q = GLM_QUAT_IDENTITY_INIT;
vec3 axis[3] = {
@@ -49,24 +51,28 @@ void __key_callback_input(
switch (key)
{
unsigned char tmp;
case GLFW_KEY_P:
case GLFW_KEY_I:
tmp = projection.w;
projection.w = projection.x;
projection.x = tmp;
animate_index=1;
break;
case GLFW_KEY_O:
tmp = projection.w;
projection.w = projection.y;
projection.y = tmp;
animate_index=2;
break;
case GLFW_KEY_I:
case GLFW_KEY_P:
tmp = projection.w;
projection.w = projection.z;
projection.z = tmp;
animate_index=3;
break;
}
set_projection_mesh(projection);
return;
}
@@ -165,5 +171,13 @@ end:
glm_quat_rotatev(p, axis[1], axis[1]);
glm_quat_rotatev(p, axis[2], axis[2]);
glm_quat_normalize(q);
// LOG INFO
if(0)
{
printf("QUAT: %2.5f %2.5f %2.5f %2.5f\n", q[0], q[1], q[2], q[3]);
printf("PROY: %3d %3d %3d (%3d)\n", projection.x, projection.y, projection.z, projection.w );
printf("\n");
}
return q;
}