diff --git a/GUI/Model/Sample/FormFactorItems.cpp b/GUI/Model/Sample/FormFactorItems.cpp index 450ead50312bdb7ad38de757c1626992fa8a1084..b643548a8931c7b8c5b36c23126f662d660ede47 100644 --- a/GUI/Model/Sample/FormFactorItems.cpp +++ b/GUI/Model/Sample/FormFactorItems.cpp @@ -51,7 +51,8 @@ Pyramid2Item::Pyramid2Item() std::unique_ptr<IFormFactor> Pyramid2Item::createFormFactor() const { - return std::make_unique<Pyramid2>(length(), width(), height(), alpha() * Units::deg); + return std::make_unique<Pyramid2>(m_length.get(), m_width.get(), m_height.get(), + m_alpha.get() * Units::deg); } void Pyramid2Item::serialize(Streamer& s) @@ -74,7 +75,7 @@ BarGaussItem::BarGaussItem() std::unique_ptr<IFormFactor> BarGaussItem::createFormFactor() const { - return std::make_unique<BarGauss>(length(), width(), height()); + return std::make_unique<BarGauss>(m_length.get(), m_width.get(), m_height.get()); } void BarGaussItem::serialize(Streamer& s) @@ -96,7 +97,7 @@ BarLorentzItem::BarLorentzItem() std::unique_ptr<IFormFactor> BarLorentzItem::createFormFactor() const { - return std::make_unique<BarLorentz>(length(), width(), height()); + return std::make_unique<BarLorentz>(m_length.get(), m_width.get(), m_height.get()); } void BarLorentzItem::serialize(Streamer& s) @@ -118,7 +119,7 @@ BoxItem::BoxItem() std::unique_ptr<IFormFactor> BoxItem::createFormFactor() const { - return std::make_unique<Box>(length(), width(), height()); + return std::make_unique<Box>(m_length.get(), m_width.get(), m_height.get()); } void BoxItem::serialize(Streamer& s) @@ -141,7 +142,7 @@ ConeItem::ConeItem() std::unique_ptr<IFormFactor> ConeItem::createFormFactor() const { - return std::make_unique<Cone>(radius(), height(), alpha() * Units::deg); + return std::make_unique<Cone>(m_radius.get(), m_height.get(), m_alpha.get() * Units::deg); } void ConeItem::serialize(Streamer& s) @@ -164,7 +165,7 @@ Pyramid6Item::Pyramid6Item() std::unique_ptr<IFormFactor> Pyramid6Item::createFormFactor() const { - return std::make_unique<Pyramid6>(baseEdge(), height(), alpha() * Units::deg); + return std::make_unique<Pyramid6>(m_baseEdge.get(), m_height.get(), m_alpha.get() * Units::deg); } void Pyramid6Item::serialize(Streamer& s) @@ -192,7 +193,8 @@ Bipyramid4Item::Bipyramid4Item() std::unique_ptr<IFormFactor> Bipyramid4Item::createFormFactor() const { - return std::make_unique<Bipyramid4>(length(), height(), heightRatio(), alpha() * Units::deg); + return std::make_unique<Bipyramid4>(m_length.get(), m_height.get(), m_heightRatio.get(), + m_alpha.get() * Units::deg); } void Bipyramid4Item::serialize(Streamer& s) @@ -214,7 +216,7 @@ CylinderItem::CylinderItem() std::unique_ptr<IFormFactor> CylinderItem::createFormFactor() const { - return std::make_unique<Cylinder>(radius(), height()); + return std::make_unique<Cylinder>(m_radius.get(), m_height.get()); } void CylinderItem::serialize(Streamer& s) @@ -233,7 +235,7 @@ DodecahedronItem::DodecahedronItem() std::unique_ptr<IFormFactor> DodecahedronItem::createFormFactor() const { - return std::make_unique<Dodecahedron>(edge()); + return std::make_unique<Dodecahedron>(m_edge.get()); } void DodecahedronItem::serialize(Streamer& s) @@ -255,7 +257,7 @@ EllipsoidalCylinderItem::EllipsoidalCylinderItem() std::unique_ptr<IFormFactor> EllipsoidalCylinderItem::createFormFactor() const { - return std::make_unique<EllipsoidalCylinder>(radiusX(), radiusY(), height()); + return std::make_unique<EllipsoidalCylinder>(m_radiusX.get(), m_radiusY.get(), m_height.get()); } void EllipsoidalCylinderItem::serialize(Streamer& s) @@ -275,7 +277,7 @@ SphereItem::SphereItem() std::unique_ptr<IFormFactor> SphereItem::createFormFactor() const { - return std::make_unique<Sphere>(radius()); + return std::make_unique<Sphere>(m_radius.get()); } void SphereItem::serialize(Streamer& s) @@ -294,7 +296,7 @@ SpheroidItem::SpheroidItem() std::unique_ptr<IFormFactor> SpheroidItem::createFormFactor() const { - return std::make_unique<Spheroid>(radius(), height()); + return std::make_unique<Spheroid>(m_radius.get(), m_height.get()); } void SpheroidItem::serialize(Streamer& s) @@ -317,7 +319,7 @@ HemiEllipsoidItem::HemiEllipsoidItem() std::unique_ptr<IFormFactor> HemiEllipsoidItem::createFormFactor() const { - return std::make_unique<HemiEllipsoid>(radiusX(), radiusY(), height()); + return std::make_unique<HemiEllipsoid>(m_radiusX.get(), m_radiusY.get(), m_height.get()); } void HemiEllipsoidItem::serialize(Streamer& s) @@ -337,7 +339,7 @@ IcosahedronItem::IcosahedronItem() std::unique_ptr<IFormFactor> IcosahedronItem::createFormFactor() const { - return std::make_unique<Icosahedron>(edge()); + return std::make_unique<Icosahedron>(m_edge.get()); } void IcosahedronItem::serialize(Streamer& s) @@ -356,7 +358,7 @@ Prism3Item::Prism3Item() std::unique_ptr<IFormFactor> Prism3Item::createFormFactor() const { - return std::make_unique<Prism3>(baseEdge(), height()); + return std::make_unique<Prism3>(m_baseEdge.get(), m_height.get()); } void Prism3Item::serialize(Streamer& s) @@ -376,7 +378,7 @@ Prism6Item::Prism6Item() std::unique_ptr<IFormFactor> Prism6Item::createFormFactor() const { - return std::make_unique<Prism6>(baseEdge(), height()); + return std::make_unique<Prism6>(m_baseEdge.get(), m_height.get()); } void Prism6Item::serialize(Streamer& s) @@ -398,7 +400,7 @@ Pyramid4Item::Pyramid4Item() std::unique_ptr<IFormFactor> Pyramid4Item::createFormFactor() const { - return std::make_unique<Pyramid4>(baseEdge(), height(), alpha() * Units::deg); + return std::make_unique<Pyramid4>(m_baseEdge.get(), m_height.get(), m_alpha.get() * Units::deg); } void Pyramid4Item::serialize(Streamer& s) @@ -420,7 +422,7 @@ CosineRippleBoxItem::CosineRippleBoxItem() std::unique_ptr<IFormFactor> CosineRippleBoxItem::createFormFactor() const { - return std::make_unique<CosineRippleBox>(length(), width(), height()); + return std::make_unique<CosineRippleBox>(m_length.get(), m_width.get(), m_height.get()); } void CosineRippleBoxItem::serialize(Streamer& s) @@ -442,7 +444,7 @@ CosineRippleGaussItem::CosineRippleGaussItem() std::unique_ptr<IFormFactor> CosineRippleGaussItem::createFormFactor() const { - return std::make_unique<CosineRippleGauss>(length(), width(), height()); + return std::make_unique<CosineRippleGauss>(m_length.get(), m_width.get(), m_height.get()); } void CosineRippleGaussItem::serialize(Streamer& s) @@ -464,7 +466,7 @@ CosineRippleLorentzItem::CosineRippleLorentzItem() std::unique_ptr<IFormFactor> CosineRippleLorentzItem::createFormFactor() const { - return std::make_unique<CosineRippleLorentz>(length(), width(), height()); + return std::make_unique<CosineRippleLorentz>(m_length.get(), m_width.get(), m_height.get()); } void CosineRippleLorentzItem::serialize(Streamer& s) @@ -488,7 +490,8 @@ SawtoothRippleBoxItem::SawtoothRippleBoxItem() std::unique_ptr<IFormFactor> SawtoothRippleBoxItem::createFormFactor() const { - return std::make_unique<SawtoothRippleBox>(length(), width(), height(), asymmetry()); + return std::make_unique<SawtoothRippleBox>(m_length.get(), m_width.get(), m_height.get(), + m_asymmetry.get()); } void SawtoothRippleBoxItem::serialize(Streamer& s) @@ -513,7 +516,8 @@ SawtoothRippleGaussItem::SawtoothRippleGaussItem() std::unique_ptr<IFormFactor> SawtoothRippleGaussItem::createFormFactor() const { - return std::make_unique<SawtoothRippleGauss>(length(), width(), height(), asymmetry()); + return std::make_unique<SawtoothRippleGauss>(m_length.get(), m_width.get(), m_height.get(), + m_asymmetry); } void SawtoothRippleGaussItem::serialize(Streamer& s) @@ -538,7 +542,8 @@ SawtoothRippleLorentzItem::SawtoothRippleLorentzItem() std::unique_ptr<IFormFactor> SawtoothRippleLorentzItem::createFormFactor() const { - return std::make_unique<SawtoothRippleLorentz>(length(), width(), height(), asymmetry()); + return std::make_unique<SawtoothRippleLorentz>(m_length.get(), m_width.get(), m_height.get(), + m_asymmetry); } void SawtoothRippleLorentzItem::serialize(Streamer& s) @@ -562,7 +567,7 @@ Pyramid3Item::Pyramid3Item() std::unique_ptr<IFormFactor> Pyramid3Item::createFormFactor() const { - return std::make_unique<Pyramid3>(baseEdge(), height(), alpha() * Units::deg); + return std::make_unique<Pyramid3>(m_baseEdge.get(), m_height.get(), m_alpha.get() * Units::deg); } void Pyramid3Item::serialize(Streamer& s) @@ -584,7 +589,7 @@ TruncatedCubeItem::TruncatedCubeItem() std::unique_ptr<IFormFactor> TruncatedCubeItem::createFormFactor() const { - return std::make_unique<TruncatedCube>(length(), removedLength()); + return std::make_unique<TruncatedCube>(m_length.get(), m_removedLength.get()); } void TruncatedCubeItem::serialize(Streamer& s) @@ -606,7 +611,7 @@ TruncatedSphereItem::TruncatedSphereItem() std::unique_ptr<IFormFactor> TruncatedSphereItem::createFormFactor() const { - return std::make_unique<TruncatedSphere>(radius(), height(), removedTop()); + return std::make_unique<TruncatedSphere>(m_radius.get(), m_height.get(), m_removedTop.get()); } void TruncatedSphereItem::serialize(Streamer& s) @@ -634,8 +639,8 @@ TruncatedSpheroidItem::TruncatedSpheroidItem() std::unique_ptr<IFormFactor> TruncatedSpheroidItem::createFormFactor() const { - return std::make_unique<TruncatedSpheroid>(radius(), height(), heightFlattening(), - removedTop()); + return std::make_unique<TruncatedSpheroid>(m_radius.get(), m_height.get(), + m_heightFlattening.get(), m_removedTop.get()); } void TruncatedSpheroidItem::serialize(Streamer& s) @@ -658,7 +663,7 @@ CantellatedCubeItem::CantellatedCubeItem() std::unique_ptr<IFormFactor> CantellatedCubeItem::createFormFactor() const { - return std::make_unique<CantellatedCube>(length(), removedLength()); + return std::make_unique<CantellatedCube>(m_length.get(), m_removedLength.get()); } void CantellatedCubeItem::serialize(Streamer& s) @@ -682,7 +687,8 @@ HorizontalCylinderItem::HorizontalCylinderItem() std::unique_ptr<IFormFactor> HorizontalCylinderItem::createFormFactor() const { - return std::make_unique<HorizontalCylinder>(radius(), length(), sliceBottom(), sliceTop()); + return std::make_unique<HorizontalCylinder>(m_radius.get(), m_length.get(), m_sliceBottom.get(), + m_sliceTop.get()); } void HorizontalCylinderItem::serialize(Streamer& s) @@ -703,7 +709,7 @@ PlatonicOctahedronItem::PlatonicOctahedronItem() std::unique_ptr<IFormFactor> PlatonicOctahedronItem::createFormFactor() const { - return std::make_unique<PlatonicOctahedron>(edge()); + return std::make_unique<PlatonicOctahedron>(m_edge.get()); } void PlatonicOctahedronItem::serialize(Streamer& s) @@ -721,7 +727,7 @@ PlatonicTetrahedronItem::PlatonicTetrahedronItem() std::unique_ptr<IFormFactor> PlatonicTetrahedronItem::createFormFactor() const { - return std::make_unique<PlatonicTetrahedron>(edge()); + return std::make_unique<PlatonicTetrahedron>(m_edge.get()); } void PlatonicTetrahedronItem::serialize(Streamer& s) diff --git a/GUI/Model/Sample/FormFactorItems.h b/GUI/Model/Sample/FormFactorItems.h index 6c006534fb1a42fc4eaa55b19c4d7965596bddba..e11194f67576bc332d8adef1ff0c4a80385f039b 100644 --- a/GUI/Model/Sample/FormFactorItems.h +++ b/GUI/Model/Sample/FormFactorItems.h @@ -27,10 +27,6 @@ private: DoubleProperty m_##nameLower; \ \ public: \ - DoubleDescriptor nameLower() const \ - { \ - return m_##nameLower; \ - } \ void set##nameUpper(double v) \ { \ m_##nameLower.set(v); \ @@ -58,7 +54,7 @@ public: DoubleDescriptors geometryValues() const override { - return {length(), width(), height(), alpha()}; + return {m_length, m_width, m_height, m_alpha}; } void serialize(Streamer& s) override; }; @@ -72,7 +68,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -85,7 +81,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -98,7 +94,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -111,7 +107,7 @@ public: FF_PROPERTY(height, Height) FF_PROPERTY(alpha, Alpha) - DoubleDescriptors geometryValues() const override { return {radius(), height(), alpha()}; } + DoubleDescriptors geometryValues() const override { return {m_radius, m_height, m_alpha}; } void serialize(Streamer& s) override; }; @@ -124,7 +120,7 @@ public: FF_PROPERTY(height, Height) FF_PROPERTY(alpha, Alpha) - DoubleDescriptors geometryValues() const override { return {baseEdge(), height(), alpha()}; } + DoubleDescriptors geometryValues() const override { return {m_baseEdge, m_height, m_alpha}; } void serialize(Streamer& s) override; }; @@ -140,7 +136,7 @@ public: DoubleDescriptors geometryValues() const override { - return {length(), height(), heightRatio(), alpha()}; + return {m_length, m_height, m_heightRatio, m_alpha}; } void serialize(Streamer& s) override; }; @@ -153,7 +149,7 @@ public: FF_PROPERTY(radius, Radius) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {radius(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_radius, m_height}; } void serialize(Streamer& s) override; }; @@ -164,7 +160,7 @@ public: FF_PROPERTY(edge, Edge) - DoubleDescriptors geometryValues() const override { return {edge()}; } + DoubleDescriptors geometryValues() const override { return {m_edge}; } void serialize(Streamer& s) override; }; @@ -177,7 +173,7 @@ public: FF_PROPERTY(radiusY, RadiusY) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {radiusX(), radiusY(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_radiusX, m_radiusY, m_height}; } void serialize(Streamer& s) override; }; @@ -188,7 +184,7 @@ public: FF_PROPERTY(radius, Radius) - DoubleDescriptors geometryValues() const override { return {radius()}; } + DoubleDescriptors geometryValues() const override { return {m_radius}; } void serialize(Streamer& s) override; }; @@ -200,7 +196,7 @@ public: FF_PROPERTY(radius, Radius) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {radius(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_radius, m_height}; } void serialize(Streamer& s) override; }; @@ -213,7 +209,7 @@ public: FF_PROPERTY(radiusY, RadiusY) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {radiusX(), radiusY(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_radiusX, m_radiusY, m_height}; } void serialize(Streamer& s) override; }; @@ -224,7 +220,7 @@ public: FF_PROPERTY(edge, Edge) - DoubleDescriptors geometryValues() const override { return {edge()}; } + DoubleDescriptors geometryValues() const override { return {m_edge}; } void serialize(Streamer& s) override; }; @@ -236,7 +232,7 @@ public: FF_PROPERTY(baseEdge, BaseEdge) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {baseEdge(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_baseEdge, m_height}; } void serialize(Streamer& s) override; }; @@ -248,7 +244,7 @@ public: FF_PROPERTY(baseEdge, BaseEdge) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {baseEdge(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_baseEdge, m_height}; } void serialize(Streamer& s) override; }; @@ -261,7 +257,7 @@ public: FF_PROPERTY(height, Height) FF_PROPERTY(alpha, Alpha) - DoubleDescriptors geometryValues() const override { return {baseEdge(), height(), alpha()}; } + DoubleDescriptors geometryValues() const override { return {m_baseEdge, m_height, m_alpha}; } void serialize(Streamer& s) override; }; @@ -274,7 +270,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -287,7 +283,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -300,7 +296,7 @@ public: FF_PROPERTY(width, Width) FF_PROPERTY(height, Height) - DoubleDescriptors geometryValues() const override { return {length(), width(), height()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_width, m_height}; } void serialize(Streamer& s) override; }; @@ -316,7 +312,7 @@ public: DoubleDescriptors geometryValues() const override { - return {length(), width(), height(), asymmetry()}; + return {m_length, m_width, m_height, m_asymmetry}; } void serialize(Streamer& s) override; }; @@ -333,7 +329,7 @@ public: DoubleDescriptors geometryValues() const override { - return {length(), width(), height(), asymmetry()}; + return {m_length, m_width, m_height, m_asymmetry}; } void serialize(Streamer& s) override; }; @@ -350,7 +346,7 @@ public: DoubleDescriptors geometryValues() const override { - return {length(), width(), height(), asymmetry()}; + return {m_length, m_width, m_height, m_asymmetry}; } void serialize(Streamer& s) override; }; @@ -364,7 +360,7 @@ public: FF_PROPERTY(height, Height) FF_PROPERTY(alpha, Alpha) - DoubleDescriptors geometryValues() const override { return {baseEdge(), height(), alpha()}; } + DoubleDescriptors geometryValues() const override { return {m_baseEdge, m_height, m_alpha}; } void serialize(Streamer& s) override; }; @@ -376,7 +372,7 @@ public: FF_PROPERTY(length, Length) FF_PROPERTY(removedLength, RemovedLength) - DoubleDescriptors geometryValues() const override { return {length(), removedLength()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_removedLength}; } void serialize(Streamer& s) override; }; @@ -389,7 +385,7 @@ public: FF_PROPERTY(height, Height) FF_PROPERTY(removedTop, RemovedTop) - DoubleDescriptors geometryValues() const override { return {radius(), height(), removedTop()}; } + DoubleDescriptors geometryValues() const override { return {m_radius, m_height, m_removedTop}; } void serialize(Streamer& s) override; }; @@ -405,7 +401,7 @@ public: DoubleDescriptors geometryValues() const override { - return {radius(), height(), heightFlattening(), removedTop()}; + return {m_radius, m_height, m_heightFlattening, m_removedTop}; } void serialize(Streamer& s) override; }; @@ -418,7 +414,7 @@ public: FF_PROPERTY(length, Length) FF_PROPERTY(removedLength, RemovedLength) - DoubleDescriptors geometryValues() const override { return {length(), removedLength()}; } + DoubleDescriptors geometryValues() const override { return {m_length, m_removedLength}; } void serialize(Streamer& s) override; }; @@ -434,7 +430,7 @@ public: DoubleDescriptors geometryValues() const override { - return {radius(), length(), sliceBottom(), sliceTop()}; + return {m_radius, m_length, m_sliceBottom, m_sliceTop}; } void serialize(Streamer& s) override; }; @@ -446,7 +442,7 @@ public: FF_PROPERTY(edge, Edge) - DoubleDescriptors geometryValues() const override { return {edge()}; } + DoubleDescriptors geometryValues() const override { return {m_edge}; } void serialize(Streamer& s) override; }; @@ -457,7 +453,7 @@ public: FF_PROPERTY(edge, Edge) - DoubleDescriptors geometryValues() const override { return {edge()}; } + DoubleDescriptors geometryValues() const override { return {m_edge}; } void serialize(Streamer& s) override; };