Material: Material appearance
Uses new material system for appearance Each feature object now has a property called ShapeMaterial that describes its physical properties. If it has a shape, it has a material. The ShapeColor attribute is replaced by a ShapeAppearance attribute. This is a material list that describes all appearance properties, not just diffuse color. As a list in can be used for all elements of a shape, such as edges and faces. A new widget is provided to allow the user to select materials in a consistent fashion. It can also launch the material editor with its more advanced capabilities.
This commit is contained in:
committed by
Chris Hennes
parent
37c38acd19
commit
ba20441935
@@ -26,6 +26,7 @@
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <QLocale>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
|
||||
@@ -305,8 +306,9 @@ TEST_F(TestMaterial, TestCalculiXSteel)
|
||||
EXPECT_FALSE(properties1[QString::fromStdString("SpecularColor")]->isNull());
|
||||
EXPECT_FALSE(properties1[QString::fromStdString("Transparency")]->isNull());
|
||||
|
||||
QLocale locale;
|
||||
EXPECT_EQ(properties[QString::fromStdString("Density")]->getString(), parseQuantity("7900.00 kg/m^3"));
|
||||
EXPECT_EQ(properties[QString::fromStdString("PoissonRatio")]->getString(), QString::fromStdString("0.3"));
|
||||
EXPECT_EQ(properties[QString::fromStdString("PoissonRatio")]->getString(), locale.toString(0.3));
|
||||
EXPECT_EQ(properties[QString::fromStdString("YoungsModulus")]->getString(), parseQuantity("210.00 GPa"));
|
||||
EXPECT_EQ(properties[QString::fromStdString("SpecificHeat")]->getString(), parseQuantity("590.00 J/kg/K"));
|
||||
EXPECT_EQ(properties[QString::fromStdString("ThermalConductivity")]->getString(), parseQuantity("43.00 W/m/K"));
|
||||
@@ -314,7 +316,7 @@ TEST_F(TestMaterial, TestCalculiXSteel)
|
||||
EXPECT_EQ(properties1[QString::fromStdString("AmbientColor")]->getString(), QString::fromStdString("(0.0020, 0.0020, 0.0020, 1.0)"));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("DiffuseColor")]->getString(), QString::fromStdString("(0.0000, 0.0000, 0.0000, 1.0)"));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("EmissiveColor")]->getString(), QString::fromStdString("(0.0000, 0.0000, 0.0000, 1.0)"));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("Shininess")]->getString(), QString::fromStdString("0.06"));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("Shininess")]->getString(), locale.toString(0.06));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("SpecularColor")]->getString(), QString::fromStdString("(0.9800, 0.9800, 0.9800, 1.0)"));
|
||||
EXPECT_EQ(properties1[QString::fromStdString("Transparency")]->getString(), QString::fromStdString("0"));
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ target_include_directories(Material_tests_run PUBLIC
|
||||
target_link_libraries(Material_tests_run
|
||||
gtest_main
|
||||
${Google_Tests_LIBS}
|
||||
Material
|
||||
Materials
|
||||
)
|
||||
|
||||
add_subdirectory(App)
|
||||
|
||||
Reference in New Issue
Block a user