moved the constructor of projection_configuration to models

This commit is contained in:
Zeno Rogue 2023-08-14 13:49:07 +02:00
parent a7cf3c4d1c
commit 3069dbd316
3 changed files with 26 additions and 28 deletions

27
hyper.h
View File

@ -254,8 +254,6 @@ enum eStereo { sOFF, sAnaglyph, sLR, sODS };
enum eModel : int;
struct trans23* gen_trans23();
/** configuration of the projection */
struct projection_configuration {
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 */
struct trans23 *ptr_model_orientation;
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();
}
projection_configuration();
trans23& mori() { return *ptr_model_orientation; }
};

View File

@ -223,8 +223,6 @@ struct trans23 {
}
};
inline trans23 *gen_trans23() { return new trans23; }
/** mirror image */
constexpr transmatrix Mirror = diag(1,-1,1,1);

View File

@ -113,6 +113,31 @@ inline bool mdBandAny() { return mdinf[pmodel].flags & mf::pseudocylindrical; }
inline bool mdPseudocylindrical() { return mdBandAny() && !(mdinf[pmodel].flags & mf::cylindrical); }
#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 ld rotation = 0;