diff --git a/3d-models.cpp b/3d-models.cpp index 366ea5ac..6f0c9273 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -16,7 +16,7 @@ ld eyepos; #define S (cgi.scalefactor / 0.805578) #define SH (cgi.scalefactor / 0.805578 * vid.height_width / 1.5) -#define revZ (WDIM == 2 ? -1 : 1) +#define revZ ((WDIM == 2 || prod) ? -1 : 1) hyperpoint shcenter; @@ -44,7 +44,7 @@ hyperpoint get_center(const vector& vh) { ld zc(ld z) { if(WDIM == 2 && GDIM == 3) return geom3::lev_to_factor(cgi.human_height * z); - return cgi.human_height * (z - 0.5); + return cgi.human_height * (z - 0.5) * revZ; } void geometry_information::add_cone(ld z0, const vector& vh, ld z1) { @@ -760,7 +760,7 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye zmid /= isize(pss); ld mindist = 1e9; - for(int i=0; i zmid : (pss[i][2] < zmid || (WDIM == 3 && !prod))) { + for(int i=0; i