mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
use_atan configurable for RotatedHyperboles
This commit is contained in:
parent
c56287ae38
commit
39ce061fa7
@ -342,6 +342,7 @@ void initConfig() {
|
|||||||
|
|
||||||
addsaver(conformal::formula, "formula");
|
addsaver(conformal::formula, "formula");
|
||||||
addsaverenum(conformal::basic_model, "basic model");
|
addsaverenum(conformal::basic_model, "basic model");
|
||||||
|
addsaver(conformal::use_atan, "use_atan");
|
||||||
|
|
||||||
addsaver(vid.consider_shader_projection, "shader-projection", true);
|
addsaver(vid.consider_shader_projection, "shader-projection", true);
|
||||||
|
|
||||||
|
@ -389,6 +389,7 @@ namespace conformal {
|
|||||||
|
|
||||||
ld spiral_angle = 70, spiral_x = 10, spiral_y = 7;
|
ld spiral_angle = 70, spiral_x = 10, spiral_y = 7;
|
||||||
int spiral_id = 7;
|
int spiral_id = 7;
|
||||||
|
bool use_atan = false;
|
||||||
|
|
||||||
cld spiral_multiplier;
|
cld spiral_multiplier;
|
||||||
ld right_spiral_multiplier = 1;
|
ld right_spiral_multiplier = 1;
|
||||||
@ -741,6 +742,11 @@ namespace conformal {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(pmodel == mdRotatedHyperboles) {
|
||||||
|
dialog::addBoolItem(XLAT("use atan to make it finite"), use_atan, 'x');
|
||||||
|
dialog::add_action([] () { use_atan = !use_atan; });
|
||||||
|
}
|
||||||
|
|
||||||
if(pmodel == mdBall) {
|
if(pmodel == mdBall) {
|
||||||
dialog::addSelItem(XLAT("projection in ball model"), fts3(vid.ballproj), 'x');
|
dialog::addSelItem(XLAT("projection in ball model"), fts3(vid.ballproj), 'x');
|
||||||
dialog::add_action([] () {
|
dialog::add_action([] () {
|
||||||
|
1
hyper.h
1
hyper.h
@ -1321,6 +1321,7 @@ namespace conformal {
|
|||||||
extern vector<cell*> movehistory;
|
extern vector<cell*> movehistory;
|
||||||
extern set<cell*> inmovehistory, inkillhistory, infindhistory;
|
extern set<cell*> inmovehistory, inkillhistory, infindhistory;
|
||||||
extern bool includeHistory;
|
extern bool includeHistory;
|
||||||
|
extern bool use_atan;
|
||||||
extern ld rotation;
|
extern ld rotation;
|
||||||
extern int do_rotate;
|
extern int do_rotate;
|
||||||
extern ld model_orientation;
|
extern ld model_orientation;
|
||||||
|
@ -539,8 +539,10 @@ void applymodel(hyperpoint H, hyperpoint& ret) {
|
|||||||
ret[1] = cosh(x) * factor;
|
ret[1] = cosh(x) * factor;
|
||||||
ret[2] = 0;
|
ret[2] = 0;
|
||||||
|
|
||||||
ret[0] = atan(ret[0]);
|
if(conformal::use_atan) {
|
||||||
ret[1] = atan(ret[1]);
|
ret[0] = atan(ret[0]);
|
||||||
|
ret[1] = atan(ret[1]);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user