renamed mdSolPerspective to mdGeodesic

This commit is contained in:
Zeno Rogue 2019-08-06 16:48:01 +02:00
parent 4f27b12ca2
commit 9350053c49
7 changed files with 16 additions and 16 deletions

View File

@ -235,7 +235,7 @@ void display_data::set_projection(int ed) {
shaderside_projection = true, glhr::new_shader_projection = glhr::shader_projection::standardH3, pers3 = true;
if(DIM == 3 && (euclid || sol || nil) && apply_models && pmodel == mdPerspective)
shaderside_projection = true, glhr::new_shader_projection = glhr::shader_projection::standardR3, pers3 = true;
if(DIM == 3 && apply_models && pmodel == mdSolPerspective)
if(DIM == 3 && apply_models && pmodel == mdGeodesic)
shaderside_projection = true, glhr::new_shader_projection = glhr::shader_projection::standardSolv, pers3 = true;
if(DIM == 3 && sphere && apply_models && pmodel == mdPerspective) {
shaderside_projection = true; pers3 = true;

View File

@ -268,7 +268,7 @@ enum eModel {
// 17..19
mdRotatedHyperboles, mdSpiral, mdPerspective,
// 20..24
mdEquivolume, mdCentralInversion, mdSimulatedPerspective, mdTwoHybrid, mdSolPerspective,
mdEquivolume, mdCentralInversion, mdSimulatedPerspective, mdTwoHybrid, mdGeodesic,
// 25..
mdGUARD, mdUnchanged, mdHyperboloidFlat, mdPolynomial, mdRug, mdFlatten
};

View File

@ -708,7 +708,7 @@ void edit_sightrange() {
}
else if(WDIM == 3) {
dialog::editNumber(sightranges[geometry], 0, 2 * M_PI, 0.5, M_PI, XLAT("3D sight range"),
pmodel == mdSolPerspective ? solhelp() : XLAT(
pmodel == mdGeodesic ? solhelp() : XLAT(
"Sight range for 3D geometries is specified in the absolute units. This value also affects the fog effect.\n\n"
"In spherical geometries, the sight range of 2? will let you see things behind you as if they were in front of you, "
"and the sight range of ? (or more) will let you see things on the antipodal point just as if they were close to you.\n\n"
@ -728,7 +728,7 @@ void edit_sightrange() {
dialog::bound_up(allowIncreasedSight() ? euclid ? 99 : gp::dist_2() * 5 : 0);
}
dialog::extra_options = [] () {
if(pmodel == mdSolPerspective) {
if(pmodel == mdGeodesic) {
dialog::addSelItem(XLAT("fog effect"), fts(sightranges[geometry]), 'R');
dialog::add_action([] {
auto xo = dialog::extra_options;
@ -798,7 +798,7 @@ void edit_sightrange() {
void menuitem_sightrange(char c) {
if(vid.use_smart_range)
dialog::addSelItem(XLAT("minimum visible cell in pixels"), fts(WDIM == 3 ? vid.smart_range_detail_3 : vid.smart_range_detail), c);
else if(pmodel == mdSolPerspective)
else if(pmodel == mdGeodesic)
dialog::addSelItem(XLAT("3D sight range"), fts(solv::solrange_xy) + "x" + fts(solv::solrange_z), c);
else if(WDIM == 3)
dialog::addSelItem(XLAT("3D sight range"), fts(sightranges[geometry]), c);

View File

@ -630,8 +630,8 @@ namespace conformal {
#endif
bool model_available(eModel pm) {
if(sol) return among(pm, mdDisk, mdPerspective, mdSolPerspective);
if(pm == mdSolPerspective && !sol) return false;
if(sol) return among(pm, mdDisk, mdPerspective, mdGeodesic);
if(pm == mdGeodesic && !sol) return false;
if(sphere && (pm == mdHalfplane || pm == mdBall))
return false;
if(DIM == 2 && pm == mdPerspective) return false;
@ -657,7 +657,7 @@ namespace conformal {
if(sol) {
if(m == mdDisk) return XLAT("simple model: projection");
if(m == mdPerspective) return XLAT("simple model: perspective");
if(m == mdSolPerspective) return XLAT("native perspective");
if(m == mdGeodesic) return XLAT("native perspective");
}
if(m == mdDisk && DIM == 3) return XLAT("perspective in 4D");
if(m == mdHalfplane && DIM == 3 && hyperbolic) return XLAT("half-space");

View File

@ -19,7 +19,7 @@ int detaillevel = 0;
bool first_cell_to_draw = true;
bool in_perspective() {
return among(pmodel, mdPerspective, mdSolPerspective);
return among(pmodel, mdPerspective, mdGeodesic);
}
bool hide_player() {
@ -5057,7 +5057,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
}
noclipped++;
}
if(pmodel == mdSolPerspective) {
if(pmodel == mdGeodesic) {
using namespace hyperpoint_vec;
hyperpoint H = tC0(V);
if(abs(H[0]) <= 2 && abs(H[1]) <= 2 && abs(H[2]) <= 2) ;
@ -6042,7 +6042,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
firelimit++;
}
else if(c->wall == waMineOpen) {
if(pmodel == mdSolPerspective && hdist0(tC0(V)) < 1e-3) {
if(pmodel == mdGeodesic && hdist0(tC0(V)) < 1e-3) {
}
else {
int mines = countMinesAround(c);

View File

@ -320,7 +320,7 @@ void applymodel(hyperpoint H, hyperpoint& ret) {
return;
}
case mdSolPerspective: {
case mdGeodesic: {
auto S = nisot::inverse_exp(H, nisot::iTable);
if(nisot::local_perspective_used()) S = nisot::local_perspective * S;
ld ratio = vid.xres / current_display->tanfov / current_display->radius / 2;
@ -886,7 +886,7 @@ transmatrix actualV(const heptspin& hs, const transmatrix& V) {
bool point_behind(hyperpoint h) {
if(sphere) return false;
if(!in_perspective()) return false;
if(pmodel == mdSolPerspective) h = nisot::inverse_exp(h, nisot::iLazy);
if(pmodel == mdGeodesic) h = nisot::inverse_exp(h, nisot::iLazy);
if(nisot::local_perspective_used()) h = nisot::local_perspective * h;
return h[2] < 0;
}
@ -911,7 +911,7 @@ bool in_smart_range(const transmatrix& T) {
hyperpoint h = tC0(T);
if(invalid_point(h)) return false;
if(nil) return cells_drawn < 2000;
if(pmodel == mdSolPerspective) return solv::in_table_range(h);
if(pmodel == mdGeodesic) return solv::in_table_range(h);
hyperpoint h1;
applymodel(h, h1);
if(invalid_point(h1)) return false;
@ -1880,7 +1880,7 @@ bool do_draw(cell *c, const transmatrix& T) {
PROD( if(product::pmap) return product::in_actual([&] { return do_draw(product::get_at(c, product::plevel), T); }); )
if(WDIM == 3) {
if(cells_drawn > vid.cells_drawn_limit) return false;
if(pmodel == mdSolPerspective) {
if(pmodel == mdGeodesic) {
if(!nisot::in_table_range(tC0(T))) return false;
if(!limited_generation(c)) return false;
}

View File

@ -640,7 +640,7 @@ namespace nisot {
}
else if(argis("-solgeo")) {
geodesic_movement = true;
pmodel = mdSolPerspective;
pmodel = mdGeodesic;
return 0;
}
else if(argis("-solnogeo")) {