From b1e76869e789a79f93bc30cd0119002bdea2227c Mon Sep 17 00:00:00 2001 From: Simon Vidanovic Date: Wed, 12 Jun 2024 14:41:17 -0700 Subject: [PATCH] Some naming and formatting fixes. --- src/Tarcog/src/EffectiveOpenness.cpp | 42 +++++++------------ src/Tarcog/src/EffectiveOpenness.hpp | 20 ++++----- src/Tarcog/tst/units/EffectiveLayers.unit.cpp | 4 +- 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/src/Tarcog/src/EffectiveOpenness.cpp b/src/Tarcog/src/EffectiveOpenness.cpp index 1ce69d4b..d6658dd0 100644 --- a/src/Tarcog/src/EffectiveOpenness.cpp +++ b/src/Tarcog/src/EffectiveOpenness.cpp @@ -5,11 +5,7 @@ namespace EffectiveLayers { ShadeOpenness::ShadeOpenness(double ah, double dl, double dr, double dtop, double dbot) : - Ah(ah), - Dl(dl), - Dr(dr), - Dtop(dtop), - Dbot(dbot) + Ah(ah), Dl(dl), Dr(dr), Dtop(dtop), Dbot(dbot) {} EffectiveOpenness::EffectiveOpenness(const double ah, @@ -18,12 +14,7 @@ namespace EffectiveLayers const double atop, const double abot, const double frontPorosity) : - Ah(ah), - Al(al), - Ar(ar), - Atop(atop), - Abot(abot), - FrontPorosity(frontPorosity) + Ah(ah), Al(al), Ar(ar), Atop(atop), Abot(abot), FrontPorosity(frontPorosity) {} bool isClosed(const EffectiveOpenness & effectiveOpenness) @@ -47,18 +38,15 @@ namespace EffectiveLayers {} Coefficients::Coefficients(double c1, double c2, double c3, double c4) : - C1(c1), - C2(c2), - C3(c3), - C4(c4) + C1(c1), C2(c2), C3(c3), C4(c4) {} EffectiveVenetian::EffectiveVenetian(double width, double height, double thickness, - const ShadeOpenness & openness, double slatAngle, double slatWidth, + const ShadeOpenness & openness, const Coefficients & coefficients) : EffectiveLayer(width, height, thickness, openness, coefficients), m_SlatAngleRad(slatAngle * 2.0 * ConstantsData::WCE_PI / 360.0), @@ -94,23 +82,23 @@ namespace EffectiveLayers double slatAngle, double slatWidth) : EffectiveVenetian( - width, height, thickness, openness, slatAngle, slatWidth, {0.016, -0.63, 0.53, 0.043}) + width, height, thickness, slatAngle, slatWidth, openness, {0.016, -0.63, 0.53, 0.043}) {} - EffectiveVerticalVenentian::EffectiveVerticalVenentian(double width, - double height, - double thickness, - const ShadeOpenness & openness, - double slatAngle, - double slatWidth) : + EffectiveVerticalVenetian::EffectiveVerticalVenetian(double width, + double height, + double thickness, + const ShadeOpenness & openness, + double slatAngle, + double slatWidth) : EffectiveVenetian( - width, height, thickness, openness, slatAngle, slatWidth, {0.041, 0.0, 0.27, 0.012}) + width, height, thickness, slatAngle, slatWidth, openness, {0.041, 0.0, 0.27, 0.012}) {} EffectiveLayerCommonType::EffectiveLayerCommonType(double width, - double height, - double thickness, - const ShadeOpenness & openness) : + double height, + double thickness, + const ShadeOpenness & openness) : EffectiveLayer(width, height, thickness, openness, {0.078, 1.2, 1.0, 1.0}) {} diff --git a/src/Tarcog/src/EffectiveOpenness.hpp b/src/Tarcog/src/EffectiveOpenness.hpp index 983ef6de..7580fe8c 100644 --- a/src/Tarcog/src/EffectiveOpenness.hpp +++ b/src/Tarcog/src/EffectiveOpenness.hpp @@ -18,8 +18,8 @@ namespace EffectiveLayers //! \brief Effective frontOpenness of shading layer that is necessary for thermal calculations. //! - //! Thermal frontOpenness of shading layer will not match physical frontOpenness and because of that some - //! calculations are required. + //! Thermal frontOpenness of shading layer will not match physical frontOpenness and because of + //! that some calculations are required. struct EffectiveOpenness { EffectiveOpenness( @@ -77,9 +77,9 @@ namespace EffectiveLayers EffectiveVenetian(double width, double height, double thickness, - const ShadeOpenness & openness, double slatAngle, double slatWidth, + const ShadeOpenness & openness, const Coefficients & coefficients); EffectiveOpenness getEffectiveOpenness() override; @@ -101,15 +101,15 @@ namespace EffectiveLayers double SlatWidth); }; - class EffectiveVerticalVenentian : public EffectiveVenetian + class EffectiveVerticalVenetian : public EffectiveVenetian { public: - EffectiveVerticalVenentian(double width, - double height, - double thickness, - const ShadeOpenness & openness, - double slatAngle, - double slatWidth); + EffectiveVerticalVenetian(double width, + double height, + double thickness, + const ShadeOpenness & openness, + double slatAngle, + double slatWidth); }; //! \brief Used for effective calculations for Perforated, Woven, Diffuse shade and BSDF diff --git a/src/Tarcog/tst/units/EffectiveLayers.unit.cpp b/src/Tarcog/tst/units/EffectiveLayers.unit.cpp index dd8a66bc..6116e319 100644 --- a/src/Tarcog/tst/units/EffectiveLayers.unit.cpp +++ b/src/Tarcog/tst/units/EffectiveLayers.unit.cpp @@ -72,7 +72,7 @@ TEST_F(TestEffectiveLayers, TestVenetianVerticalEffectiveLayerWithTopAndBotOpenn EffectiveLayers::ShadeOpenness openness{0.998224968, 0, 0, 0.01, 0.008}; - EffectiveLayers::EffectiveVerticalVenentian venetian{ + EffectiveLayers::EffectiveVerticalVenetian venetian{ width, height, materialThickness, openness, slatTiltAngle, slatWidth}; const auto effectiveThickness{venetian.effectiveThickness()}; @@ -99,7 +99,7 @@ TEST_F(TestEffectiveLayers, TestVenetianVerticalEffectiveLayerWithTopAndBotOpenn EffectiveLayers::ShadeOpenness openness{0.998224966, 0, 0, 0.01, 0.008}; - EffectiveLayers::EffectiveVerticalVenentian venetian{ + EffectiveLayers::EffectiveVerticalVenetian venetian{ width, height, materialThickness, openness, slatTiltAngle, slatWidth}; const auto effectiveThickness{venetian.effectiveThickness()};