1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

3d:: fixed linewidth

This commit is contained in:
Zeno Rogue 2019-03-21 19:14:12 +01:00
parent 9289cdd301
commit 076e1f2977

View File

@ -677,7 +677,7 @@ void dqi_poly::gldraw() {
#endif #endif
double scale_at(const transmatrix& T) { double scale_at(const transmatrix& T) {
if(DIM == 3) return 1 / (tC0(T))[2]; if(DIM == 3 && pmodel == mdPerspective) return 1 / (tC0(T))[2];
using namespace hyperpoint_vec; using namespace hyperpoint_vec;
hyperpoint h1, h2, h3; hyperpoint h1, h2, h3;
applymodel(tC0(T), h1); applymodel(tC0(T), h1);
@ -689,7 +689,7 @@ double scale_at(const transmatrix& T) {
double linewidthat(const hyperpoint& h) { double linewidthat(const hyperpoint& h) {
if(!(vid.antialias & AA_LINEWIDTH)) return 1; if(!(vid.antialias & AA_LINEWIDTH)) return 1;
else if(hyperbolic && pmodel == mdDisk && vid.alpha == 1) { else if(hyperbolic && pmodel == mdDisk && vid.alpha == 1) {
double dz = h[2]; double dz = h[DIM];
if(dz < 1 || abs(dz-current_display->scrdist) < 1e-6) return 1; if(dz < 1 || abs(dz-current_display->scrdist) < 1e-6) return 1;
else { else {
double dx = sqrt(dz * dz - 1); double dx = sqrt(dz * dz - 1);
@ -698,7 +698,7 @@ double linewidthat(const hyperpoint& h) {
return dfc; return dfc;
} }
} }
else if(svg::in) { else if(svg::in || inHighQual) {
using namespace hyperpoint_vec; using namespace hyperpoint_vec;
hyperpoint h0 = h / zlevel(h); hyperpoint h0 = h / zlevel(h);
transmatrix T = rgpushxto0(h0); transmatrix T = rgpushxto0(h0);