20 std::unique_ptr<ApproachDescriptor> ades,
LayerType laytyp)
22 m_surfaceArray(surfaceArray.release()),
23 m_layerThickness(thickness),
24 m_approachDescriptor(nullptr),
25 m_representingVolume(nullptr),
27 m_ssRepresentingSurface(1) {
29 ades->registerLayer(*
this);
40 return m_approachDescriptor.get();
52 Surface* rSurface =
const_cast<Surface*
>(&surfaceRepresentation());
53 if (materialDecorator !=
nullptr) {
54 materialDecorator->
decorate(*rSurface);
58 if (surfaceRepresentation().surfaceMaterial() !=
nullptr) {
59 m_ssRepresentingSurface = 2;
62 if (m_approachDescriptor) {
64 m_ssApproachSurfaces = 1;
67 for (
auto& aSurface : m_approachDescriptor->containedSurfaces()) {
69 auto mutableASurface =
const_cast<Surface*
>(aSurface);
71 if (materialDecorator !=
nullptr) {
72 materialDecorator->
decorate(*mutableASurface);
75 if (aSurface->surfaceMaterial() !=
nullptr) {
76 m_ssApproachSurfaces = 2;
83 m_ssSensitiveSurfaces = 1;
86 for (
auto& sSurface : m_surfaceArray->surfaces()) {
88 auto mutableSSurface =
const_cast<Surface*
>(sSurface);
90 if (materialDecorator !=
nullptr) {
91 materialDecorator->
decorate(*mutableSSurface);
94 if (sSurface->surfaceMaterial() !=
nullptr) {
95 m_ssSensitiveSurfaces = 2;