mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 13:32:59 +00:00 
			
		
		
		
	dialog:: made dialog matrix more intuitive for anims::movement_angle
This commit is contained in:
		| @@ -591,7 +591,7 @@ EX namespace dialog { | |||||||
|     vector<hyperpoint> pts; |     vector<hyperpoint> pts; | ||||||
|     for(int a=0; a<dim; a++) { |     for(int a=0; a<dim; a++) { | ||||||
|       hyperpoint h = C0; h[a] = r; |       hyperpoint h = C0; h[a] = r; | ||||||
|       pts.push_back(rot_inverse(T.get()) * h); |       pts.push_back(T.get() * h); | ||||||
|       } |       } | ||||||
|  |  | ||||||
|     flat_model_enabler fme; |     flat_model_enabler fme; | ||||||
| @@ -612,7 +612,7 @@ EX namespace dialog { | |||||||
|       queuecurve(V, cols[a], 0, PPR::LINE); |       queuecurve(V, cols[a], 0, PPR::LINE); | ||||||
|       } |       } | ||||||
|     if(dim == 3) for(int a=0; a<dim; a++) { |     if(dim == 3) for(int a=0; a<dim; a++) { | ||||||
|       auto pt = pts[a]; ld val = pt[2] * vid.fsize / r / 5; |       auto pt = pts[a]; ld val = -pt[2] * vid.fsize / r / 5; | ||||||
|       curvepoint(hyperpoint(pt[0], pt[1]+val, 1, 1)); |       curvepoint(hyperpoint(pt[0], pt[1]+val, 1, 1)); | ||||||
|       curvepoint(hyperpoint(pt[0]-val, pt[1]-val*sqrt(3)/2, 1, 1)); |       curvepoint(hyperpoint(pt[0]-val, pt[1]-val*sqrt(3)/2, 1, 1)); | ||||||
|       curvepoint(hyperpoint(pt[0]+val, pt[1]-val*sqrt(3)/2, 1, 1)); |       curvepoint(hyperpoint(pt[0]+val, pt[1]-val*sqrt(3)/2, 1, 1)); | ||||||
|   | |||||||
| @@ -1299,16 +1299,16 @@ EX void apply() { | |||||||
|  |  | ||||||
|     case maRotation: |     case maRotation: | ||||||
|       if(GDIM == 3) shift_view(ztangent(-rotation_distance)); |       if(GDIM == 3) shift_view(ztangent(-rotation_distance)); | ||||||
|       rotate_view(movement_angle.get()); |  | ||||||
|       rotate_view(spin(TAU * t / period)); |  | ||||||
|       rotate_view(rot_inverse(movement_angle.get())); |       rotate_view(rot_inverse(movement_angle.get())); | ||||||
|  |       rotate_view(spin(TAU * t / period)); | ||||||
|  |       rotate_view(movement_angle.get()); | ||||||
|       if(GDIM == 3) shift_view(ztangent(rotation_distance)); |       if(GDIM == 3) shift_view(ztangent(rotation_distance)); | ||||||
|       moved(); |       moved(); | ||||||
|       break; |       break; | ||||||
|      |      | ||||||
|     case maTranslationRotation: |     case maTranslationRotation: | ||||||
|       shift_view( |       shift_view( | ||||||
|         rot_inverse(movement_angle.get()) * xtangent(cycle_length * t / period) |         movement_angle.get() * xtangent(cycle_length * t / period) | ||||||
|         ); |         ); | ||||||
|       moved(); |       moved(); | ||||||
|       rotate_view(cspin(0, GDIM-1, TAU * t / period)); |       rotate_view(cspin(0, GDIM-1, TAU * t / period)); | ||||||
| @@ -1320,19 +1320,21 @@ EX void apply() { | |||||||
|     #if CAP_BT |     #if CAP_BT | ||||||
|     case maParabolic: |     case maParabolic: | ||||||
|       reflect_view(); |       reflect_view(); | ||||||
|       View = movement_angle.get() * View; |       rotate_view(rot_inverse(movement_angle.get())); | ||||||
|       if(GDIM == 2) |       if(GDIM == 2) | ||||||
|         View = bt::parabolic(parabolic_length * t / period) * View; |         View = bt::parabolic(parabolic_length * t / period) * View; | ||||||
|       else |       else | ||||||
|         View = bt::parabolic3(parabolic_length * t / period, 0) * View; |         View = bt::parabolic3(parabolic_length * t / period, 0) * View; | ||||||
|       View = rot_inverse(movement_angle.get()) * View; |       rotate_view(movement_angle.get()); | ||||||
|       moved(); |       moved(); | ||||||
|       break; |       break; | ||||||
|     #endif |     #endif | ||||||
|     case maCircle: { |     case maCircle: { | ||||||
|  |       rotate_view(rot_inverse(movement_angle.get())); | ||||||
|       centerover = rotation_center; |       centerover = rotation_center; | ||||||
|       ld alpha = circle_spins * TAU * ticks / period; |       ld alpha = circle_spins * TAU * ticks / period; | ||||||
|       View = spin(-cos_auto(circle_radius)*alpha) * xpush(circle_radius) * spin(alpha) * rotation_center_View; |       View = spin(-cos_auto(circle_radius)*alpha) * xpush(circle_radius) * spin(alpha) * rotation_center_View; | ||||||
|  |       rotate_view(movement_angle.get()); | ||||||
|       moved(); |       moved(); | ||||||
|       break; |       break; | ||||||
|       } |       } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue