Functions | |
| MRVIEWER_API void | resetToDefaults () |
| Reset to some sane default. | |
| MRVIEWER_API bool | getShowLeadingZero () |
True: 0.1, false: .1. | |
| MRVIEWER_API void | setShowLeadingZero (bool show) |
| MRVIEWER_API char | getThousandsSeparator () |
| MRVIEWER_API void | setThousandsSeparator (char ch) |
| MRVIEWER_API std::optional< LengthUnit > | getUiLengthUnit () |
| MRVIEWER_API void | setUiLengthUnit (std::optional< LengthUnit > unit, bool setPreferredLeadingZero) |
| MRVIEWER_API std::optional< LengthUnit > | getModelLengthUnit () |
| MRVIEWER_API void | setModelLengthUnit (std::optional< LengthUnit > unit) |
| MRVIEWER_API std::optional< LengthUnit > | getActualModelLengthUnit () |
| MRVIEWER_API DegreesMode | getDegreesMode () |
| MRVIEWER_API void | setDegreesMode (DegreesMode mode, bool setPreferredPrecision) |
| MRVIEWER_API int | getUiLengthPrecision () |
| MRVIEWER_API void | setUiLengthPrecision (int precision) |
| MRVIEWER_API int | getUiAnglePrecision () |
| MRVIEWER_API void | setUiAnglePrecision (int precision) |
| MRVIEWER_API int | getUiRatioPrecision () |
| MRVIEWER_API void | setUiRatioPrecision (int precision) |
|
nodiscard |
Returns the units in which the coordinates are stored in the memory of MeshLib-based application; it is computes as getModelLengthUnit().or_else( getUiLengthUnit() ); this function is important for serialization in the formats with known length units
|
nodiscard |
|
nodiscard |
Set "sourceUnit" for Length based dimensions, which reflects on scaling input data to match "targetUnit" Length based dimensions: length, speed, area, volume, etc This can be null to indicate "no unit".
|
nodiscard |
True: 0.1, false: .1.
|
nodiscard |
Can be '\0' to indicate no separator. fractional == true means to the right of the fractional point, if any.
|
nodiscard |
|
nodiscard |
Whether this means total number of digits or the number of digits after the decimal point depends on another setting (getDefaultUnitParams().style) that's currently not exposed in this file.
|
nodiscard |
Set "targetUnit" for Length based dimensions, which reflects on UI suffix Length based dimensions: length, speed, area, volume, etc This can be null to indicate "no unit". If setPreferredLeadingZero == true, will call setShowLeadingZero() to match this unit (currently inches = false, everything else = true).
|
nodiscard |
| MRVIEWER_API void MR::UnitSettings::resetToDefaults | ( | ) |
Reset to some sane default.
| MRVIEWER_API void MR::UnitSettings::setDegreesMode | ( | DegreesMode | mode, |
| bool | setPreferredPrecision ) |
| MRVIEWER_API void MR::UnitSettings::setModelLengthUnit | ( | std::optional< LengthUnit > | unit | ) |
| MRVIEWER_API void MR::UnitSettings::setShowLeadingZero | ( | bool | show | ) |
| MRVIEWER_API void MR::UnitSettings::setThousandsSeparator | ( | char | ch | ) |
| MRVIEWER_API void MR::UnitSettings::setUiAnglePrecision | ( | int | precision | ) |
| MRVIEWER_API void MR::UnitSettings::setUiLengthPrecision | ( | int | precision | ) |
| MRVIEWER_API void MR::UnitSettings::setUiLengthUnit | ( | std::optional< LengthUnit > | unit, |
| bool | setPreferredLeadingZero ) |
| MRVIEWER_API void MR::UnitSettings::setUiRatioPrecision | ( | int | precision | ) |