1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-19 17:40:20 +00:00

improved hemisphere model; nicer handling of ballangle

This commit is contained in:
Zeno Rogue
2018-10-25 19:58:38 +02:00
parent 9ad39df2c0
commit 804b489ebf
6 changed files with 40 additions and 31 deletions

View File

@@ -296,6 +296,7 @@ namespace conformal {
int do_rotate = 1;
ld model_orientation, halfplane_scale;
ld ocos, osin;
ld cos_ball, sin_ball;
bool model_straight;
ld top_z = 5;
@@ -413,6 +414,8 @@ namespace conformal {
}
void configure() {
ld ball = -vid.ballangle * M_PI / 180;
cos_ball = cos(ball), sin_ball = sin(ball);
ocos = cos(model_orientation * M_PI / 180);
osin = sin(model_orientation * M_PI / 180);
model_straight = (ocos > 1 - 1e-9);