mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-22 08:14:07 +00:00
moved the constructor of projection_configuration to models
This commit is contained in:
parent
a7cf3c4d1c
commit
3069dbd316
27
hyper.h
27
hyper.h
@ -254,8 +254,6 @@ enum eStereo { sOFF, sAnaglyph, sLR, sODS };
|
|||||||
|
|
||||||
enum eModel : int;
|
enum eModel : int;
|
||||||
|
|
||||||
struct trans23* gen_trans23();
|
|
||||||
|
|
||||||
/** configuration of the projection */
|
/** configuration of the projection */
|
||||||
struct projection_configuration {
|
struct projection_configuration {
|
||||||
eModel model; /**< which projection, see classes.cpp */
|
eModel model; /**< which projection, see classes.cpp */
|
||||||
@ -291,30 +289,7 @@ struct projection_configuration {
|
|||||||
int back_and_front; /* 0 = do not, 1 = do, 2 = only back */
|
int back_and_front; /* 0 = do not, 1 = do, 2 = only back */
|
||||||
struct trans23 *ptr_model_orientation;
|
struct trans23 *ptr_model_orientation;
|
||||||
|
|
||||||
projection_configuration() {
|
projection_configuration();
|
||||||
formula = "z^2"; top_z = 5; model_transition = 1; spiral_angle = 70; spiral_x = 10; spiral_y = 7;
|
|
||||||
rotational_nil = 1;
|
|
||||||
right_spiral_multiplier = 1;
|
|
||||||
any_spiral_multiplier = 1;
|
|
||||||
sphere_spiral_multiplier = 2;
|
|
||||||
spiral_cone = 360;
|
|
||||||
use_atan = false;
|
|
||||||
product_z_scale = 1;
|
|
||||||
aitoff_parameter = .5;
|
|
||||||
miller_parameter = .8;
|
|
||||||
loximuthal_parameter = 0;
|
|
||||||
winkel_parameter = .5;
|
|
||||||
show_hyperboloid_flat = true;
|
|
||||||
depth_scaling = 1;
|
|
||||||
vr_angle = 0;
|
|
||||||
hyperboloid_scaling = 1;
|
|
||||||
vr_zshift = 0;
|
|
||||||
vr_scale_factor = 1;
|
|
||||||
back_and_front = 0;
|
|
||||||
dualfocus_autoscale = false;
|
|
||||||
axial_angle = 90;
|
|
||||||
ptr_model_orientation = gen_trans23();
|
|
||||||
}
|
|
||||||
|
|
||||||
trans23& mori() { return *ptr_model_orientation; }
|
trans23& mori() { return *ptr_model_orientation; }
|
||||||
};
|
};
|
||||||
|
@ -223,8 +223,6 @@ struct trans23 {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
inline trans23 *gen_trans23() { return new trans23; }
|
|
||||||
|
|
||||||
/** mirror image */
|
/** mirror image */
|
||||||
constexpr transmatrix Mirror = diag(1,-1,1,1);
|
constexpr transmatrix Mirror = diag(1,-1,1,1);
|
||||||
|
|
||||||
|
25
models.cpp
25
models.cpp
@ -113,6 +113,31 @@ inline bool mdBandAny() { return mdinf[pmodel].flags & mf::pseudocylindrical; }
|
|||||||
inline bool mdPseudocylindrical() { return mdBandAny() && !(mdinf[pmodel].flags & mf::cylindrical); }
|
inline bool mdPseudocylindrical() { return mdBandAny() && !(mdinf[pmodel].flags & mf::cylindrical); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
projection_configuration::projection_configuration() {
|
||||||
|
formula = "z^2"; top_z = 5; model_transition = 1; spiral_angle = 70; spiral_x = 10; spiral_y = 7;
|
||||||
|
rotational_nil = 1;
|
||||||
|
right_spiral_multiplier = 1;
|
||||||
|
any_spiral_multiplier = 1;
|
||||||
|
sphere_spiral_multiplier = 2;
|
||||||
|
spiral_cone = 360;
|
||||||
|
use_atan = false;
|
||||||
|
product_z_scale = 1;
|
||||||
|
aitoff_parameter = .5;
|
||||||
|
miller_parameter = .8;
|
||||||
|
loximuthal_parameter = 0;
|
||||||
|
winkel_parameter = .5;
|
||||||
|
show_hyperboloid_flat = true;
|
||||||
|
depth_scaling = 1;
|
||||||
|
vr_angle = 0;
|
||||||
|
hyperboloid_scaling = 1;
|
||||||
|
vr_zshift = 0;
|
||||||
|
vr_scale_factor = 1;
|
||||||
|
back_and_front = 0;
|
||||||
|
dualfocus_autoscale = false;
|
||||||
|
axial_angle = 90;
|
||||||
|
ptr_model_orientation = new trans23;
|
||||||
|
}
|
||||||
|
|
||||||
EX namespace models {
|
EX namespace models {
|
||||||
|
|
||||||
EX ld rotation = 0;
|
EX ld rotation = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user