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

rename members

parent 7c9424fc
No related branches found
No related tags found
1 merge request!183new base class ITerm
......@@ -42,9 +42,9 @@ makeLayoutComputation(const std::vector<ProcessedLayout>& layouts, const Simulat
DWBATerm::DWBATerm(const ProcessedSample& sample, const SimulationOptions& options,
bool forcePolarized)
: m_fresnel_map(sample.fresnelMap())
, m_spec_comp(options.includeSpecular() ? new GISASSpecularContribution() : nullptr)
, m_roughness_comp(sample.hasRoughness() ? new RoughMultiLayerContribution(&sample) : nullptr)
, m_layout_comps(makeLayoutComputation(sample.layouts(), options,
, m_specular_contrib(options.includeSpecular() ? new GISASSpecularContribution() : nullptr)
, m_roughness_contrib(sample.hasRoughness() ? new RoughMultiLayerContribution(&sample) : nullptr)
, m_layout_contribs(makeLayoutComputation(sample.layouts(), options,
sample.containsMagneticMaterial() || forcePolarized))
{
}
......@@ -55,14 +55,14 @@ void DWBATerm::computeTerm(DiffuseElement& ele) const
{
ele.setFresnelMap(m_fresnel_map);
for (auto& layout_comp : m_layout_comps)
layout_comp->compute(ele);
for (auto& contrib : m_layout_contribs)
contrib->compute(ele);
if (m_roughness_comp)
m_roughness_comp->compute(ele);
if (m_roughness_contrib)
m_roughness_contrib->compute(ele);
if (m_spec_comp)
m_spec_comp->compute(ele);
if (m_specular_contrib)
m_specular_contrib->compute(ele);
stepProgress();
}
......@@ -45,9 +45,9 @@ public:
private:
const IFresnelMap* const m_fresnel_map;
const std::unique_ptr<const GISASSpecularContribution> m_spec_comp;
const std::unique_ptr<const RoughMultiLayerContribution> m_roughness_comp;
const std::vector<std::unique_ptr<const ParticleLayoutContribution>> m_layout_comps;
const std::unique_ptr<const GISASSpecularContribution> m_specular_contrib;
const std::unique_ptr<const RoughMultiLayerContribution> m_roughness_contrib;
const std::vector<std::unique_ptr<const ParticleLayoutContribution>> m_layout_contribs;
};
#endif // BORNAGAIN_CORE_TERM_DWBATERM_H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment