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

show_hyperboloid_flat option

This commit is contained in:
Zeno Rogue 2020-11-01 20:10:08 +01:00
parent 4362f06b0b
commit 8c4b700466
5 changed files with 11 additions and 1 deletions

View File

@ -515,6 +515,7 @@ EX void initConfig() {
addsaver(vid.binary_width, "binary-tiling-width", 1);
addsaver(pconf.collignon_parameter, "collignon-parameter", 1);
addsaver(pconf.collignon_reflected, "collignon-reflect", false);
addsaver(pconf.show_hyperboloid_flat, "hyperboloid-flat", true);
addsaver(pconf.aitoff_parameter, "aitoff-parameter");
addsaver(pconf.miller_parameter, "miller-parameter");

View File

@ -2164,7 +2164,7 @@ EX void reverse_side_priorities() {
// on the sphere, parts on the back are drawn first
EX void draw_backside() {
DEBBI(DF_GRAPH, ("draw_backside"));
if(pmodel == mdHyperboloid && hyperbolic) {
if(pmodel == mdHyperboloid && hyperbolic && pconf.show_hyperboloid_flat) {
dynamicval<eModel> dv (pmodel, mdHyperboloidFlat);
for(auto& ptd: ptds)
if(!among(ptd->prio, PPR::MOBILE_ARROW, PPR::OUTCIRCLE, PPR::CIRCLE))

View File

@ -242,6 +242,7 @@ struct projection_configuration {
ld model_orientation, halfplane_scale, model_orientation_yz;
ld collignon_parameter;
ld aitoff_parameter, miller_parameter, loximuthal_parameter, winkel_parameter;
bool show_hyperboloid_flat;
bool collignon_reflected;
string formula;
eModel basic_model;
@ -272,6 +273,7 @@ struct projection_configuration {
miller_parameter = .8;
loximuthal_parameter = 0;
winkel_parameter = .5;
show_hyperboloid_flat = true;
}
};

View File

@ -2000,6 +2000,7 @@ EX void draw_model_elements() {
}
case mdHyperboloid: {
if(!pconf.show_hyperboloid_flat) return;
if(hyperbolic) {
#if CAP_QUEUE
curvepoint(point3(0,0,1));

View File

@ -445,6 +445,8 @@ EX namespace models {
}
if(among(vpmodel, mdDisk, mdBall, mdHyperboloid, mdRotatedHyperboles, mdPanini)) {
dynamicval<eModel> v(vpconf.model, vpconf.model);
if(vpmodel == mdHyperboloid) vpconf.model = mdDisk;
dialog::addSelItem(XLAT("projection distance"), fts(vpconf.alpha) + " (" + current_proj_name() + ")", 'p');
dialog::add_action(projectionDialog);
}
@ -615,6 +617,10 @@ EX namespace models {
dialog::scaleLog();
});
}
if(vpmodel == mdHyperboloid) {
dialog::addBoolItem_action(XLAT("show flat"), pconf.show_hyperboloid_flat, 'b');
}
if(vpmodel == mdCollignon) {
dialog::addSelItem(XLAT("parameter"), fts(vpconf.collignon_parameter) + (vpconf.collignon_reflected ? " (r)" : ""), 'b');