Euclidean sky as a shape
This commit is contained in:
parent
88d6c0d144
commit
baa1871d01
|
@ -674,6 +674,18 @@ void geometry_information::make_star(hpcshape& sh, ld rad) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void geometry_information::make_euclidean_sky() {
|
||||||
|
bshape(cgi.shEuclideanSky, PPR::EUCLIDEAN_SKY);
|
||||||
|
for(int x=-20; x<20; x++)
|
||||||
|
for(int y=-20; y<20; y++)
|
||||||
|
hpcsquare(
|
||||||
|
zpush(cgi.WALL) * hpxy(x, y),
|
||||||
|
zpush(cgi.WALL) * hpxy(x, y+1),
|
||||||
|
zpush(cgi.WALL) * hpxy(x+1, y),
|
||||||
|
zpush(cgi.WALL) * hpxy(x+1, y+1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
hyperpoint psmin(hyperpoint H) {
|
hyperpoint psmin(hyperpoint H) {
|
||||||
hyperpoint res;
|
hyperpoint res;
|
||||||
res[2] = asin_auto(H[2]);
|
res[2] = asin_auto(H[2]);
|
||||||
|
@ -1007,8 +1019,10 @@ void geometry_information::make_3d_models() {
|
||||||
make_ball(shDisk, orbsize*.2, 2);
|
make_ball(shDisk, orbsize*.2, 2);
|
||||||
make_ball(shHeptaMarker, zhexf*.2, 1);
|
make_ball(shHeptaMarker, zhexf*.2, 1);
|
||||||
make_ball(shSnowball, zhexf*.1, 0);
|
make_ball(shSnowball, zhexf*.1, 0);
|
||||||
if(euclid)
|
if(euclid) {
|
||||||
make_ball(shSun, 0.5, 2);
|
make_ball(shSun, 0.5, 2);
|
||||||
|
make_euclidean_sky();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
make_star(shSun, 3);
|
make_star(shSun, 3);
|
||||||
make_star(shNightStar, 0.75);
|
make_star(shNightStar, 0.75);
|
||||||
|
|
12
graph.cpp
12
graph.cpp
|
@ -4622,17 +4622,7 @@ void draw_euclidean_sky() {
|
||||||
if(WDIM == 3 || GDIM == 2) return;
|
if(WDIM == 3 || GDIM == 2) return;
|
||||||
transmatrix T = ggmatrix(currentmap->gamestart());
|
transmatrix T = ggmatrix(currentmap->gamestart());
|
||||||
T = gpushxto0(tC0(T)) * T;
|
T = gpushxto0(tC0(T)) * T;
|
||||||
for(int x=-20; x<20; x++)
|
queuepoly(T, cgi.shEuclideanSky, 0x0044e4FF);
|
||||||
for(int y=-20; y<20; y++) {
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x, y));
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x, y+1));
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y));
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y+1));
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x, y+1));
|
|
||||||
curvepoint(T * zpush(cgi.WALL) * hpxy(x+1, y));
|
|
||||||
}
|
|
||||||
queuecurve(0, 0x0044e4FF, PPR::EUCLIDEAN_SKY).flags |= POLY_TRIANGLES;
|
|
||||||
|
|
||||||
queuepolyat(T * zpush(cgi.SKY+0.5) * xpush(cgi.SKY+0.5), cgi.shSun, 0xFFFF00FF, PPR::SKY);
|
queuepolyat(T * zpush(cgi.SKY+0.5) * xpush(cgi.SKY+0.5), cgi.shSun, 0xFFFF00FF, PPR::SKY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
hyper.h
3
hyper.h
|
@ -4374,7 +4374,7 @@ hpcshape
|
||||||
shKnife, shTongue, shFlailMissile, shTrapArrow,
|
shKnife, shTongue, shFlailMissile, shTrapArrow,
|
||||||
shPirateHook, shPirateHood, shEyepatch, shPirateX,
|
shPirateHook, shPirateHood, shEyepatch, shPirateX,
|
||||||
// shScratch,
|
// shScratch,
|
||||||
shHeptaMarker, shSnowball, shSun, shNightStar,
|
shHeptaMarker, shSnowball, shSun, shNightStar, shEuclideanSky,
|
||||||
shSkeletonBody, shSkull, shSkullEyes, shFatBody, shWaterElemental,
|
shSkeletonBody, shSkull, shSkullEyes, shFatBody, shWaterElemental,
|
||||||
shPalaceGate, shFishTail,
|
shPalaceGate, shFishTail,
|
||||||
shMouse, shMouseLegs, shMouseEyes,
|
shMouse, shMouseLegs, shMouseEyes,
|
||||||
|
@ -4524,6 +4524,7 @@ hpcshape
|
||||||
void balltriangle(hyperpoint a, hyperpoint b, hyperpoint c, ld rad, int lev);
|
void balltriangle(hyperpoint a, hyperpoint b, hyperpoint c, ld rad, int lev);
|
||||||
void make_ball(hpcshape& sh, ld rad, int lev);
|
void make_ball(hpcshape& sh, ld rad, int lev);
|
||||||
void make_star(hpcshape& sh, ld rad);
|
void make_star(hpcshape& sh, ld rad);
|
||||||
|
void make_euclidean_sky();
|
||||||
void adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye, ld shift_head, int q, ld zoom=1);
|
void adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye, ld shift_head, int q, ld zoom=1);
|
||||||
void shift_last_straight(ld z);
|
void shift_last_straight(ld z);
|
||||||
void queueball(const transmatrix& V, ld rad, color_t col, eItem what);
|
void queueball(const transmatrix& V, ld rad, color_t col, eItem what);
|
||||||
|
|
Loading…
Reference in New Issue