aabb printer function

This commit is contained in:
Recep Aslantas
2018-04-02 12:08:08 +03:00
parent 984916d520
commit b0991342a6

View File

@@ -171,4 +171,33 @@ glm_versor_print(versor vec,
#undef m
}
CGLM_INLINE
void
glm_aabb_print(vec3 bbox[2],
const char * __restrict tag,
FILE * __restrict ostream) {
int i, j;
#define m 3
fprintf(ostream, "AABB (%s):\n", tag ? tag: "float");
for (i = 0; i < 2; i++) {
fprintf(ostream, "\t|");
for (j = 0; j < m; j++) {
fprintf(ostream, "%0.4f", bbox[i][j]);
if (j != m - 1)
fprintf(ostream, "\t");
}
fprintf(ostream, "|\n");
}
fprintf(ostream, "\n");
#undef m
}
#endif /* cglm_io_h */