MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / setModelLengthUnit

Function setModelLengthUnit

source/MRViewer/MRUnitSettings.cpp:176–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void setModelLengthUnit( std::optional<LengthUnit> unit )
177{
178 auto getDependentUnit = getLengthDependentUnit();
179
180 forAllLengthUnits( [&]<typename E>( )
181 {
182 auto params = getDefaultUnitParams<E>();
183 params.sourceUnit = unit ? std::optional( getDependentUnit.template operator() < E > ( *unit ) ) : std::nullopt;
184 setDefaultUnitParams( params );
185 } );
186}
187
188std::optional<LengthUnit> getActualModelLengthUnit()
189{

Callers 3

loadSettingsMethod · 0.85
resetToDefaultsFunction · 0.85

Calls 3

getLengthDependentUnitFunction · 0.85
forAllLengthUnitsFunction · 0.85
setDefaultUnitParamsFunction · 0.85

Tested by

no test coverage detected