mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-17 20:53:02 +00:00
nicer model flag naming
This commit is contained in:
parent
2693298825
commit
7f967ba30d
@ -595,20 +595,20 @@ const modelinfo mdinf[int(mdPolynomial)+1] = {
|
||||
{"hemisphere", "sphere", "sphere", mf::conformal | mf::space},
|
||||
{X3("band equidistant"), mf::band | mf::equidistant | mf::euc_boring},
|
||||
{X3("band equi-area"), mf::band | mf::equiarea | mf::euc_boring},
|
||||
{X3("sinusoidal"), mf::quasiband | mf::equiarea | mf::euc_boring},
|
||||
{X3("sinusoidal"), mf::pseudoband | mf::equiarea | mf::euc_boring},
|
||||
{X3("two-point equidistant"), mf::equidistant | mf::euc_boring | mf::twopoint},
|
||||
{X3("fisheye"), 0},
|
||||
{X3("Joukowsky transform"), mf::hyper_only | mf::conformal},
|
||||
{X3("Joukowsky+inversion"), mf::hyper_only | mf::conformal},
|
||||
{X3("rotated hyperboles"), mf::hyper_only},
|
||||
{X3("spiral/ring"), mf::hyper_or_torus | mf::quasiband},
|
||||
{X3("spiral/ring"), mf::hyper_or_torus | mf::uses_bandshift},
|
||||
{X3("native perspective"), 0},
|
||||
{X3("azimuthal equi-volume"), mf::azimuthal | mf::equivolume | mf::euc_boring},
|
||||
{X3("central inversion"), mf::azimuthal | mf::conformal},
|
||||
{X3("two-point azimuthal"), mf::euc_boring | mf::twopoint},
|
||||
{X3("two-point hybrid"), mf::euc_boring | mf::twopoint},
|
||||
{X3("geodesic"), 0},
|
||||
{X3("Mollweide"), mf::euc_boring | mf::quasiband | mf::equiarea },
|
||||
{X3("Mollweide"), mf::euc_boring | mf::pseudoband | mf::equiarea },
|
||||
{X3(""), 0},
|
||||
{X3("polynomial"), mf::conformal}
|
||||
};
|
||||
|
@ -295,7 +295,7 @@ typedef unsigned long long flagtype;
|
||||
|
||||
namespace mf {
|
||||
static const flagtype azimuthal = 1;
|
||||
static const flagtype band = 2 + 512;
|
||||
static const flagtype cylindrical = 2;
|
||||
static const flagtype equiarea = 4;
|
||||
static const flagtype equidistant = 8;
|
||||
static const flagtype conformal = 16;
|
||||
@ -303,9 +303,13 @@ namespace mf {
|
||||
static const flagtype space = 64;
|
||||
static const flagtype hyper_only = 128;
|
||||
static const flagtype hyper_or_torus = 256;
|
||||
static const flagtype quasiband = 512;
|
||||
static const flagtype pseudocylindrical = 512; /* includes cylindrical */
|
||||
static const flagtype equivolume = 1024;
|
||||
static const flagtype twopoint = 2048;
|
||||
static const flagtype uses_bandshift = 4096;
|
||||
|
||||
static const flagtype band = (cylindrical | pseudocylindrical | uses_bandshift);
|
||||
static const flagtype pseudoband = (pseudocylindrical | uses_bandshift);
|
||||
};
|
||||
|
||||
struct modelinfo {
|
||||
|
@ -1831,7 +1831,7 @@ EX void draw_boundary(int w) {
|
||||
|
||||
EX ld band_shift = 0;
|
||||
EX void fix_the_band(transmatrix& T) {
|
||||
if(((mdinf[pmodel].flags & mf::quasiband) && T[DIM][DIM] > 1e6) || (sphere && pmodel == mdSpiral)) {
|
||||
if(((mdinf[pmodel].flags & mf::uses_bandshift) && T[DIM][DIM] > 1e6) || (sphere && pmodel == mdSpiral)) {
|
||||
hyperpoint H = tC0(T);
|
||||
find_zlev(H);
|
||||
models::apply_orientation(H[0], H[1]);
|
||||
|
@ -108,7 +108,7 @@ EX namespace polygonal {
|
||||
|
||||
#if HDR
|
||||
inline bool mdAzimuthalEqui() { return among(pmodel, mdEquidistant, mdEquiarea, mdEquivolume); }
|
||||
inline bool mdBandAny() { return among(pmodel, mdBand, mdBandEquidistant, mdBandEquiarea, mdSinusoidal, mdMollweide); }
|
||||
inline bool mdBandAny() { return mdinf[pmodel].flags & mf::pseudoband; }
|
||||
#endif
|
||||
|
||||
EX namespace models {
|
||||
|
Loading…
Reference in New Issue
Block a user