1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-24 09:24:49 +00:00

3d:: change model orientation in the YZ plane

This commit is contained in:
Zeno Rogue
2019-03-20 18:32:03 +01:00
parent 745f1b302b
commit 01a2f0cc5a
4 changed files with 39 additions and 6 deletions

View File

@@ -1396,11 +1396,11 @@ namespace conformal {
extern bool use_atan;
extern ld rotation;
extern int do_rotate;
extern ld model_orientation;
extern ld model_orientation, model_orientation_yz;
extern ld halfplane_scale;
extern ld ocos, osin;
extern ld ocos, osin, ocos_yz, osin_yz;
extern ld cos_ball, sin_ball;
extern bool model_straight;
extern bool model_straight, model_straight_yz;
extern ld model_transition;
extern ld top_z;
extern ld spiral_angle, spiral_x, spiral_y;
@@ -1411,6 +1411,8 @@ namespace conformal {
template<class A>
void apply_orientation(A& x, A& y) { if(!model_straight) tie(x,y) = make_pair(x*ocos + y*osin, y*ocos - x*osin); }
template<class A>
void apply_orientation_yz(A& x, A& y) { if(!model_straight_yz) tie(x,y) = make_pair(x*ocos_yz + y*osin_yz, y*ocos_yz - x*osin_yz); }
template<class A>
void apply_ball(A& x, A& y) { tie(x,y) = make_pair(x*cos_ball + y*sin_ball, y*cos_ball - x*sin_ball); }
void configure();