Skip to content
Snippets Groups Projects

Move roughness from LayerInterface to Layer (#20)

Merged Mikhail Svechnikov requested to merge m.i20 into main
All threads resolved!
2 files
+ 4
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -23,7+23,7 @@
LayerRoughness* zeroRoughness()
{
K_CorrelationModel autocorr(0);
ErfInterlayer interlayer;
return new LayerRoughness(&autocorr, &interlayer);
}
@@ -38,7+38,7 @@
, m_thickness(thickness)
, m_roughness(roughness ? roughness->clone() : zeroRoughness())
{
// If the roughness is not defined by user, it is equivalent to the situation when roughness is
// defined, but has zero rms. To avoid constant nullptr checks in the code and to ease
// resampling it was accepted that "Layer" should always have non-null roughness descriptor.
ASSERT(m_roughness);
if (thickness < 0.)
throw std::runtime_error("Layer contructor called with negative thickness");
Loading