light: use mangle_from_vec in CalcPoints_Debug to dump point normal

This commit is contained in:
Eric Wasylishen 2017-02-14 23:07:37 -07:00
parent 77baa2b90b
commit 365c143039
1 changed files with 2 additions and 0 deletions

View File

@ -434,10 +434,12 @@ CalcPoints_Debug(const lightsurf_t *surf, const bsp2_t *bsp)
for (int s = 0; s < surf->width; s++) {
const int i = t*surf->width + s;
const vec_t *point = surf->points[i];
const glm::vec3 mangle = mangle_from_vec(vec3_t_to_glm(surf->normals[i]));
fprintf(f, "{\n");
fprintf(f, "\"classname\" \"light\"\n");
fprintf(f, "\"origin\" \"%f %f %f\"\n", point[0], point[1], point[2]);
fprintf(f, "\"mangle\" \"%f %f %f\"\n", mangle[0], mangle[1], mangle[2]);
fprintf(f, "\"face\" \"%d\"\n", facenum);
fprintf(f, "\"occluded\" \"%d\"\n", (int)surf->occluded[i]);
fprintf(f, "\"s\" \"%d\"\n", s);