1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-01 07:20:15 +00:00

added model: three-point equidistant

This commit is contained in:
Zeno Rogue
2021-03-06 11:54:25 +01:00
parent 250909a6f3
commit 3940f624fd
3 changed files with 82 additions and 5 deletions

View File

@@ -198,6 +198,7 @@ EX namespace models {
return false;
if(GDIM == 2 && pm == mdPerspective) return false;
if(GDIM == 2 && pm == mdEquivolume) return false;
if(pm == mdThreePoint && !(GDIM == 3 && !nonisotropic && !prod)) return false;
if(GDIM == 3 && among(pm, mdBall, mdHyperboloid, mdFormula, mdPolygonal, mdRotatedHyperboles, mdSpiral, mdHemisphere)) return false;
if(pm == mdCentralInversion && !euclid) return false;
if(pm == mdPoorMan) return hyperbolic;
@@ -211,7 +212,7 @@ EX namespace models {
if((m == mdPerspective || m == mdGeodesic) && panini_alpha) return true;
return
among(m, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid, mdHorocyclic, mdAxial, mdAntiAxial, mdQuadrant,
mdWerner, mdAitoff, mdHammer, mdLoximuthal, mdWinkelTripel) || mdBandAny();
mdWerner, mdAitoff, mdHammer, mdLoximuthal, mdWinkelTripel, mdThreePoint) || mdBandAny();
}
/** @brief returns the broken coordinate, or zero */
@@ -236,7 +237,7 @@ EX namespace models {
EX bool product_model(eModel m) {
if(!prod) return false;
if(among(m, mdPerspective, mdHyperboloid, mdEquidistant)) return false;
if(among(m, mdPerspective, mdHyperboloid, mdEquidistant, mdThreePoint)) return false;
return true;
}
@@ -602,7 +603,7 @@ EX namespace models {
if(vpmodel == mdHemisphere && euclid)
add_edit(vpconf.euclid_to_sphere);
if(among(vpmodel, mdTwoPoint, mdSimulatedPerspective, mdTwoHybrid))
if(among(vpmodel, mdTwoPoint, mdSimulatedPerspective, mdTwoHybrid, mdThreePoint))
add_edit(vpconf.twopoint_param);
if(vpmodel == mdFisheye)