18 #include <QDomDocument>
25 QDomElement elemLight = doc.createElement( QStringLiteral(
"directional-light" ) );
26 elemLight.setAttribute( QStringLiteral(
"x" ), mDirection.
x() );
27 elemLight.setAttribute( QStringLiteral(
"y" ), mDirection.
y() );
28 elemLight.setAttribute( QStringLiteral(
"z" ), mDirection.
z() );
30 elemLight.setAttribute( QStringLiteral(
"intensity" ), mIntensity );
36 mDirection.
set( elem.attribute( QStringLiteral(
"x" ) ).toFloat(),
37 elem.attribute( QStringLiteral(
"y" ) ).toFloat(),
38 elem.attribute( QStringLiteral(
"z" ) ).toFloat() );
40 mIntensity = elem.attribute( QStringLiteral(
"intensity" ) ).toFloat();
45 return mDirection == other.mDirection && mColor == other.mColor && mIntensity == other.mIntensity;