mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-06-14 01:16:50 +00:00
2d3d:: fixed some 3d model elements
This commit is contained in:
parent
757a154399
commit
87c436b8cb
|
@ -12,6 +12,8 @@ namespace hr {
|
||||||
#define S (scalefactor / 0.805578)
|
#define S (scalefactor / 0.805578)
|
||||||
#define SH (scalefactor / 0.805578 * geom3::height_width / 1.5)
|
#define SH (scalefactor / 0.805578 * geom3::height_width / 1.5)
|
||||||
|
|
||||||
|
#define revZ (WDIM == 2 ? -1 : 1)
|
||||||
|
|
||||||
hyperpoint shcenter;
|
hyperpoint shcenter;
|
||||||
|
|
||||||
vector<hyperpoint> get_shape(hpcshape sh) {
|
vector<hyperpoint> get_shape(hpcshape sh) {
|
||||||
|
@ -359,6 +361,7 @@ void addtri(array<hyperpoint, 3> hs, int kind) {
|
||||||
else if(hsh[s] < 0.12*S) shi[s] = -0.1 - 0.4 * (hsh[s]/S - 0.1) / (0.12 - 0.1);
|
else if(hsh[s] < 0.12*S) shi[s] = -0.1 - 0.4 * (hsh[s]/S - 0.1) / (0.12 - 0.1);
|
||||||
else shi[s] = -0.1;
|
else shi[s] = -0.1;
|
||||||
shi[s] *= geom3::human_height;
|
shi[s] *= geom3::human_height;
|
||||||
|
shi[s] *= revZ;
|
||||||
}
|
}
|
||||||
if(ok && kind == 1) for(int i=0; i<3; i++) {
|
if(ok && kind == 1) for(int i=0; i<3; i++) {
|
||||||
int j = (i+1) % 3;
|
int j = (i+1) % 3;
|
||||||
|
@ -374,9 +377,9 @@ void addtri(array<hyperpoint, 3> hs, int kind) {
|
||||||
for(int s=0; s<3; s++) {
|
for(int s=0; s<3; s++) {
|
||||||
hyperpoint h = hs[s];
|
hyperpoint h = hs[s];
|
||||||
ld zz = zc(0.925);
|
ld zz = zc(0.925);
|
||||||
if(h[0] < -0.05*S) zz += (h[0]/S + 0.05) * SH;
|
if(h[0] < -0.05*S) zz += revZ * (h[0]/S + 0.05) * SH;
|
||||||
if(hdist0(h) <= 0.0501*S) {
|
if(hdist0(h) <= 0.0501*S) {
|
||||||
zz += sqrt(0.0026 - pow(hdist0(h)/S, 2)) * SH;
|
zz += revZ * sqrt(0.0026 - pow(hdist0(h)/S, 2)) * SH;
|
||||||
}
|
}
|
||||||
hpcpush(zpush(zz) * h);
|
hpcpush(zpush(zz) * h);
|
||||||
}
|
}
|
||||||
|
@ -448,7 +451,7 @@ void make_head_only() {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_texture(shPHeadOnly);
|
add_texture(shPHeadOnly);
|
||||||
shift_last(-geom3::HEAD - 0.01 * SH);
|
shift_last(-geom3::HEAD - revZ * 0.01 * SH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -866,6 +869,7 @@ void make_3d_models() {
|
||||||
|
|
||||||
#undef S
|
#undef S
|
||||||
#undef SH
|
#undef SH
|
||||||
|
#undef revZ
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user