From f56b15a5eead0fe3ba7b5468ccb5c954ee2c8335 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 7 Apr 2021 14:44:38 +0200 Subject: [PATCH] edit_stretch function --- geom-exp.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/geom-exp.cpp b/geom-exp.cpp index 5400d857..2f32ea5a 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -686,6 +686,18 @@ EX void menuitem_nilwidth(char key) { }); } +EX void edit_stretch() { + stretch::mstretch = false; + ray::reset_raycaster(); + dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"), + XLAT( + "Stretch the metric along the fibers. This can currently be done in rotation spaces and in 8-cell, 24-cell and 120-cell. " + "Value of 0 means not stretched, -1 means S2xE or H2xE (works only in the limit). (Must be > -1)" + ) + ); + dialog::reaction = [] { if(abs(stretch::factor+1) < 1e-3) stretch::factor = -.9; ray::reset_raycaster(); }; + } + EX void showEuclideanMenu() { // for(int i=2; i -1)" - ) - ); - dialog::reaction = ray::reset_raycaster; - }); + dialog::add_action(edit_stretch); } dialog::addBreak(100);