mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
improved model naming a bit
This commit is contained in:
parent
46ae64e945
commit
3f941cabb0
@ -1803,7 +1803,7 @@ vector<geometryinfo> ginf = {
|
|||||||
#define X3(x) x, x, x
|
#define X3(x) x, x, x
|
||||||
|
|
||||||
const modelinfo models[int(mdPolynomial)+1] = {
|
const modelinfo models[int(mdPolynomial)+1] = {
|
||||||
{X3("disk"), mf::azimuthal | mf::conformal},
|
{"disk/Gans", "general perspective", "general perspective", mf::azimuthal | mf::conformal},
|
||||||
{"half-plane", "inversion", "half-plane", mf::conformal},
|
{"half-plane", "inversion", "half-plane", mf::conformal},
|
||||||
{"band", "band", "Mercator", mf::band | mf::conformal},
|
{"band", "band", "Mercator", mf::band | mf::conformal},
|
||||||
{X3("polygonal"), mf::conformal},
|
{X3("polygonal"), mf::conformal},
|
||||||
|
@ -595,18 +595,21 @@ namespace conformal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool model_has_transition() {
|
bool model_has_transition() {
|
||||||
return among(pmodel, mdJoukowsky, mdJoukowskyInverted, mdBand);
|
return among(pmodel, mdJoukowsky, mdJoukowskyInverted, mdBand) && DIM == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int editpos = 0;
|
int editpos = 0;
|
||||||
|
|
||||||
string get_model_name(eModel m) {
|
string get_model_name(eModel m) {
|
||||||
|
if(m == mdDisk && DIM == 3 && hyperbolic) return XLAT("ball model/Gans");
|
||||||
|
if(m == mdDisk && DIM == 3) return XLAT("perspective in 4D");
|
||||||
|
if(m == mdHalfplane && DIM == 3 && hyperbolic) return XLAT("half-space");
|
||||||
if(sphere)
|
if(sphere)
|
||||||
return models[m].name_spherical;
|
return XLAT(models[m].name_spherical);
|
||||||
if(euclid)
|
if(euclid)
|
||||||
return models[m].name_euclidean;
|
return XLAT(models[m].name_euclidean);
|
||||||
if(hyperbolic)
|
if(hyperbolic)
|
||||||
return models[m].name_hyperbolic;
|
return XLAT(models[m].name_hyperbolic);
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -670,7 +673,7 @@ namespace conformal {
|
|||||||
void model_menu() {
|
void model_menu() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK | sm::CENTER;
|
cmode = sm::SIDE | sm::MAYDARK | sm::CENTER;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
dialog::init(XLAT("models of hyperbolic geometry"));
|
dialog::init(XLAT("models and projections"));
|
||||||
for(int i=0; i<mdGUARD; i++) {
|
for(int i=0; i<mdGUARD; i++) {
|
||||||
eModel m = eModel(i);
|
eModel m = eModel(i);
|
||||||
if(m == mdFormula && ISMOBILE) continue;
|
if(m == mdFormula && ISMOBILE) continue;
|
||||||
@ -709,7 +712,8 @@ namespace conformal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(among(pmodel, mdDisk, mdBall, mdHyperboloid, mdRotatedHyperboles)) {
|
if(among(pmodel, mdDisk, mdBall, mdHyperboloid, mdRotatedHyperboles)) {
|
||||||
dialog::addSelItem(XLAT("Projection at the ground level"), fts3(vid.alpha), 'p');
|
dialog::addSelItem(XLAT("projection distance"),
|
||||||
|
fts3(vid.alpha) + " (" + current_proj_name() + ")", 'p');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(model_has_orientation()) {
|
if(model_has_orientation()) {
|
||||||
|
16
geom-exp.cpp
16
geom-exp.cpp
@ -448,17 +448,21 @@ string current_proj_name() {
|
|||||||
if(pmodel != mdDisk)
|
if(pmodel != mdDisk)
|
||||||
return conformal::get_model_name(pmodel);
|
return conformal::get_model_name(pmodel);
|
||||||
else if(hyperbolic && vid.alpha == 1)
|
else if(hyperbolic && vid.alpha == 1)
|
||||||
return "Poincaré";
|
return XLAT("Poincaré");
|
||||||
else if(hyperbolic && vid.alpha == 0)
|
else if(hyperbolic && vid.alpha == 0)
|
||||||
return "Klein";
|
return XLAT("Klein");
|
||||||
else if(hyperbolic && vid.alpha == -1)
|
else if(hyperbolic && vid.alpha == -1)
|
||||||
return "inverted Poincaré";
|
return XLAT("inverted Poincaré");
|
||||||
else if(sphere && vid.alpha == 1)
|
else if(sphere && vid.alpha == 1)
|
||||||
return "stereographic";
|
return XLAT("stereographic");
|
||||||
else if(sphere && vid.alpha == 0)
|
else if(sphere && vid.alpha == 0)
|
||||||
return "gnomonic";
|
return XLAT("gnomonic");
|
||||||
|
else if(sphere && vid.alpha >= 999)
|
||||||
|
return XLAT("orthographic");
|
||||||
|
else if(hyperbolic && vid.alpha >= 999)
|
||||||
|
return XLAT("Gans");
|
||||||
else
|
else
|
||||||
return "generalized perspective";
|
return XLAT("general perspective");
|
||||||
}
|
}
|
||||||
|
|
||||||
void showEuclideanMenu() {
|
void showEuclideanMenu() {
|
||||||
|
@ -381,7 +381,7 @@ void showDisplayMode() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(DIM == 2)
|
if(DIM == 2)
|
||||||
dialog::addBoolItem(XLAT("models of hyperbolic geometry"), pmodel, 'a');
|
dialog::addBoolItem(XLAT("models and projections"), pmodel, 'a');
|
||||||
|
|
||||||
if(DIM == 2)
|
if(DIM == 2)
|
||||||
dialog::addBoolItem(XLAT("animations/history"), anims::any_on(), 'A');
|
dialog::addBoolItem(XLAT("animations/history"), anims::any_on(), 'A');
|
||||||
|
Loading…
Reference in New Issue
Block a user