meshlabjs icon indicating copy to clipboard operation
meshlabjs copied to clipboard

Parameter Widget: Relative Float

Open cignoni opened this issue 9 years ago • 0 comments

Like in meshlab we need a way to input a number that can be easily inserted as a percentage of the bbox of the scene screen shot 2015-08-07 at 8 24 37 am Like in the above example the two edit field are connected and continuously updated: the left editbox contain the value in world unit (as common float parameter input) and the right one contains the same value expressed as a percentage of the diagonal of the boundingbox of the scene. When the user change one value the other one is updated accordingly. The widget returns the value in world unit

When specified we imagine something like that

vertRatioWidget = builder.RelativeFloat({
            defperc=1.0,
            label: "Vertex Ratio",
            tooltip: "Probability that a vertex is randomly selected"
        });

where defperc is the default percentage shown in the widget at the start

cignoni avatar Aug 07 '15 15:08 cignoni