19 LayerInterface::LayerInterface() : m_topLayer(nullptr), m_bottomLayer(nullptr)
21 setName(
"LayerInterface");
24 LayerInterface::~LayerInterface() =
default;
32 const Layer* bottom_layer)
35 result->setLayersTopBottom(top_layer, bottom_layer);
40 const Layer* bottom_layer,
50 m_roughness.reset(roughness.
clone());
51 registerChild(m_roughness.get());
56 return std::vector<const INode*>() << m_roughness;
61 void LayerInterface::setLayersTopBottom(
const Layer* top_layer,
const Layer* bottom_layer)
63 if (top_layer ==
nullptr || bottom_layer ==
nullptr)
65 "Attempt to set nullptr.");
66 m_topLayer = top_layer;
67 m_bottomLayer = bottom_layer;
Defines many exception classes in namespace Exceptionss.
Defines class LayerInterface.
Defines class LayerRoughness.
Interface between two layers, possibly with roughness.
static LayerInterface * createRoughInterface(const Layer *top_layer, const Layer *bottom_layer, const LayerRoughness &roughness)
Creates rough interface between two layers.
LayerInterface * clone() const
Returns a clone of this ISample object.
static LayerInterface * createSmoothInterface(const Layer *top_layer, const Layer *bottom_layer)
Creates smooth interface between two layers.
std::vector< const INode * > getChildren() const
Returns a vector of children (const).
void setRoughness(const LayerRoughness &roughness)
Sets roughness of the interface.
A roughness of interface between two layers.
LayerRoughness * clone() const
Returns a clone of this ISample object.
A layer, with thickness (in nanometer) and material.