mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	fixed autocentering in same_in_same; also renamed smIsometric to smIsotropic
This commit is contained in:
		| @@ -1630,7 +1630,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); } | EX ld xcross(ld x1, ld y1, ld x2, ld y2) { return x1 + (x2 - x1) * y1 / (y1 - y2); } | ||||||
|  |  | ||||||
| #if HDR | #if HDR | ||||||
| enum eShiftMethod { smProduct, smIsometric, smEmbedded, smLie, smGeodesic }; | enum eShiftMethod { smProduct, smIsotropic, smEmbedded, smLie, smGeodesic }; | ||||||
| enum eEmbeddedShiftMethodChoice { smcNone, smcBoth, smcAuto }; | enum eEmbeddedShiftMethodChoice { smcNone, smcBoth, smcAuto }; | ||||||
| enum eShiftMethodApplication { smaManualCamera, smaAutocenter, smaObject, smaWallRadar }; | enum eShiftMethodApplication { smaManualCamera, smaAutocenter, smaObject, smaWallRadar }; | ||||||
| #endif | #endif | ||||||
| @@ -1649,9 +1649,10 @@ EX bool use_embedded_shift(eShiftMethodApplication sma) { | |||||||
|  |  | ||||||
| EX eShiftMethod shift_method(eShiftMethodApplication sma) { | EX eShiftMethod shift_method(eShiftMethodApplication sma) { | ||||||
|   if(gproduct) return smProduct; |   if(gproduct) return smProduct; | ||||||
|   if(embedded_plane && sma == smaObject) return geom3::same_in_same() ? smIsometric : smEmbedded; |   if(embedded_plane && geom3::same_in_same()) return smIsotropic; | ||||||
|  |   if(embedded_plane && sma == smaObject) return geom3::same_in_same() ? smIsotropic : smEmbedded; | ||||||
|   if(embedded_plane && use_embedded_shift(sma)) return nonisotropic ? smLie : smEmbedded; |   if(embedded_plane && use_embedded_shift(sma)) return nonisotropic ? smLie : smEmbedded; | ||||||
|   if(!nonisotropic && !stretch::in()) return smIsometric; |   if(!nonisotropic && !stretch::in()) return smIsotropic; | ||||||
|   if(!nisot::geodesic_movement && !embedded_plane) return smLie; |   if(!nisot::geodesic_movement && !embedded_plane) return smLie; | ||||||
|   return smGeodesic; |   return smGeodesic; | ||||||
|   } |   } | ||||||
| @@ -1666,7 +1667,7 @@ EX transmatrix shift_object(const transmatrix Position, const transmatrix& ori, | |||||||
|       hyperpoint h = product::direct_exp(ori * direction); |       hyperpoint h = product::direct_exp(ori * direction); | ||||||
|       return Position * rgpushxto0(h); |       return Position * rgpushxto0(h); | ||||||
|       } |       } | ||||||
|     case smIsometric: { |     case smIsotropic: { | ||||||
|       return Position * rgpushxto0(direct_exp(direction)); |       return Position * rgpushxto0(direct_exp(direction)); | ||||||
|       } |       } | ||||||
|     case smEmbedded: { |     case smEmbedded: { | ||||||
|   | |||||||
| @@ -3221,7 +3221,7 @@ EX transmatrix get_shift_view_of(const hyperpoint H, const transmatrix V, eShift | |||||||
|   switch(sm) { |   switch(sm) { | ||||||
|     case smProduct: |     case smProduct: | ||||||
|       return rgpushxto0(direct_exp(lp_iapply(H))) * V; |       return rgpushxto0(direct_exp(lp_iapply(H))) * V; | ||||||
|     case smIsometric: |     case smIsotropic: | ||||||
|       return rgpushxto0(direct_exp(H)) * V; |       return rgpushxto0(direct_exp(H)) * V; | ||||||
|     case smEmbedded: |     case smEmbedded: | ||||||
|       return get_shift_view_embedded_of(V, rgpushxto0(direct_exp(H))) * V; |       return get_shift_view_embedded_of(V, rgpushxto0(direct_exp(H))) * V; | ||||||
| @@ -3285,7 +3285,7 @@ void shift_view_by_matrix(const transmatrix T, eShiftMethod sm) { | |||||||
|     case smEmbedded: |     case smEmbedded: | ||||||
|       shift_view_embedded(T); |       shift_view_embedded(T); | ||||||
|       return; |       return; | ||||||
|     case smIsometric: |     case smIsotropic: | ||||||
|     case smProduct: |     case smProduct: | ||||||
|       shift_view_mmul(T); |       shift_view_mmul(T); | ||||||
|       return; |       return; | ||||||
| @@ -3340,7 +3340,7 @@ EX void shift_view_to(shiftpoint H, eShiftMethod sm IS(shift_method(smaManualCam | |||||||
|  |  | ||||||
| EX void shift_view_towards(shiftpoint H, ld l, eShiftMethod sm IS(shift_method(smaManualCamera))) { | EX void shift_view_towards(shiftpoint H, ld l, eShiftMethod sm IS(shift_method(smaManualCamera))) { | ||||||
|   switch(sm) { |   switch(sm) { | ||||||
|     case smIsometric: |     case smIsotropic: | ||||||
|     case smEmbedded: |     case smEmbedded: | ||||||
|       shift_view_by_matrix(rspintox(unshift(H)) * xpush(-l) * spintox(unshift(H)), sm); |       shift_view_by_matrix(rspintox(unshift(H)) * xpush(-l) * spintox(unshift(H)), sm); | ||||||
|       return; |       return; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue