Skip to content
Snippets Groups Projects
Commit d78ef1bf authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

simplify roughness setting

parent dc17d4a7
No related branches found
No related tags found
1 merge request!2683simplify roughness setting
......@@ -292,13 +292,6 @@ bool isValidBasicRoughness(const LayerRoughness* roughness)
return true;
}
void set_BasicRoughnessItem(BasicRoughnessItem* parent, const LayerRoughness& sample)
{
parent->setSigma(sample.sigma());
parent->setHurst(sample.hurst());
parent->setLateralCorrelationLength(sample.lateralCorrLength());
}
void set_LayerItem(LayerItem* parent, const Layer* layer, const LayerInterface* top_interface)
{
parent->setThickness(layer->thickness());
......@@ -309,8 +302,10 @@ void set_LayerItem(LayerItem* parent, const Layer* layer, const LayerInterface*
const LayerRoughness* roughness = top_interface->roughness();
if (isValidBasicRoughness(roughness)) {
auto* t = new BasicRoughnessItem;
t->setSigma(roughness->sigma());
t->setHurst(roughness->hurst());
t->setLateralCorrelationLength(roughness->lateralCorrLength());
parent->roughnessSelection().setCertainItem(t);
set_BasicRoughnessItem(t, *roughness);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment