mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-25 15:30:13 +00:00
embeddings:: removed smESL2 method -- smEmbedded works fine now for all non-product embeddings
This commit is contained in:
parent
793ae6fcd9
commit
5b89cfdecf
@ -1408,7 +1408,7 @@ EX bool asign(ld y1, ld y2) { return signum(y1) != signum(y2); }
|
||||
EX ld xcross(ld x1, ld y1, ld x2, ld y2) { return x1 + (x2 - x1) * y1 / (y1 - y2); }
|
||||
|
||||
#if HDR
|
||||
enum eShiftMethod { smProduct, smIsotropic, smEmbedded, smLie, smGeodesic, smESL2 };
|
||||
enum eShiftMethod { smProduct, smIsotropic, smEmbedded, smLie, smGeodesic };
|
||||
enum eEmbeddedShiftMethodChoice { smcNone, smcBoth, smcAuto };
|
||||
enum eShiftMethodApplication { smaManualCamera, smaAutocenter, smaObject, smaWallRadar, smaAnimation };
|
||||
#endif
|
||||
@ -1427,8 +1427,8 @@ EX bool use_embedded_shift(eShiftMethodApplication sma) {
|
||||
|
||||
EX eShiftMethod shift_method(eShiftMethodApplication sma) {
|
||||
if(gproduct) return smProduct;
|
||||
if(embedded_plane && sma == smaObject) return cgi.emb->is_same_in_same() ? smIsotropic : smEmbedded;
|
||||
if(embedded_plane && use_embedded_shift(sma)) return sl2 ? smESL2 : nonisotropic ? smLie : smEmbedded;
|
||||
if(embedded_plane && sma == smaObject) return smEmbedded;
|
||||
if(embedded_plane && use_embedded_shift(sma)) return smEmbedded;
|
||||
if(!nonisotropic && !stretch::in() && !(!nisot::geodesic_movement && hyperbolic && bt::in())) return smIsotropic;
|
||||
if(!nisot::geodesic_movement && !embedded_plane) return smLie;
|
||||
return smGeodesic;
|
||||
|
14
hypgraph.cpp
14
hypgraph.cpp
@ -3294,16 +3294,6 @@ EX void shift_v_by_vector(transmatrix& V, const hyperpoint H, eShiftMethod sm IS
|
||||
case smGeodesic:
|
||||
V = iview_inverse(nisot::parallel_transport(view_inverse(V), -H));
|
||||
return;
|
||||
case smESL2: {
|
||||
hyperpoint H1 = cgi.emb->intermediate_to_actual(lp_iapply(-H));
|
||||
transmatrix IV = view_inverse(V);
|
||||
transmatrix rot = V * cgi.emb->map_relative_push(IV * C0);
|
||||
transmatrix V1 = gpushxto0(H1) * gpushxto0(IV*C0);
|
||||
transmatrix IV1 = view_inverse(V1);
|
||||
transmatrix rot1 = V1 * cgi.emb->map_relative_push(IV1 * C0);
|
||||
V = rot * inverse(rot1) * V1;
|
||||
return;
|
||||
}
|
||||
default:
|
||||
throw hr_exception("unknown shift method (embedded not supported)");
|
||||
}
|
||||
@ -3364,8 +3354,6 @@ EX void shift_v_to(transmatrix& V, shiftpoint H, eShiftMethod sm IS(shift_method
|
||||
case smEmbedded:
|
||||
case smProduct:
|
||||
return shift_v_by_matrix(V, gpushxto0(unshift(H)), sm);
|
||||
case smESL2:
|
||||
return shift_v_by_vector(V, -lp_apply(cgi.emb->actual_to_intermediate(lp_iapply(unshift(H)))), sm);
|
||||
case smLie:
|
||||
return shift_v_by_vector(V, -lie_log(H), sm);
|
||||
return;
|
||||
@ -3386,8 +3374,6 @@ EX void shift_v_towards(transmatrix& V, shiftpoint H, ld l, eShiftMethod sm IS(s
|
||||
case smIsotropic:
|
||||
case smEmbedded:
|
||||
return shift_v_by_matrix(V, rspintox(unshift(H)) * xpush(-l) * spintox(unshift(H)), sm);
|
||||
case smESL2:
|
||||
return shift_v_by_vector(V, -lp_apply(tangent_length(cgi.emb->actual_to_intermediate(lp_iapply(unshift(H))), l)), sm);
|
||||
case smLie:
|
||||
return shift_v_by_vector(V, tangent_length(lie_log(H), -l), sm);
|
||||
case smGeodesic:
|
||||
|
Loading…
x
Reference in New Issue
Block a user