18 #include <QDomDocument>
26 QString skyboxTypeStr = element.attribute( QStringLiteral(
"skybox-type" ) );
27 if ( skyboxTypeStr == QLatin1String(
"Distinct Faces" ) )
29 else if ( skyboxTypeStr == QLatin1String(
"Panoramic Texture" ) )
31 mPanoramicTexturePath = pathResolver.
readPath( element.attribute( QStringLiteral(
"panoramic-texture-path" ) ) );
32 mCubeMapFacesPaths.clear();
33 mCubeMapFacesPaths[ QStringLiteral(
"posX" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posX-texture-path" ) ) );
34 mCubeMapFacesPaths[ QStringLiteral(
"posY" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posY-texture-path" ) ) );
35 mCubeMapFacesPaths[ QStringLiteral(
"posZ" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posZ-texture-path" ) ) );
36 mCubeMapFacesPaths[ QStringLiteral(
"negX" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negX-texture-path" ) ) );
37 mCubeMapFacesPaths[ QStringLiteral(
"negY" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negY-texture-path" ) ) );
38 mCubeMapFacesPaths[ QStringLiteral(
"negZ" ) ] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negZ-texture-path" ) ) );
43 switch ( mSkyboxType )
46 element.setAttribute( QStringLiteral(
"skybox-type" ), QStringLiteral(
"Distinct Faces" ) );
49 element.setAttribute( QStringLiteral(
"skybox-type" ), QStringLiteral(
"Panoramic Texture" ) );
54 element.setAttribute( QStringLiteral(
"panoramic-texture-path" ), pathResolver.
writePath( mPanoramicTexturePath ) );
55 element.setAttribute( QStringLiteral(
"posX-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"posX" ) ] ) );
56 element.setAttribute( QStringLiteral(
"posY-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"posY" ) ] ) );
57 element.setAttribute( QStringLiteral(
"posZ-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"posZ" ) ] ) );
58 element.setAttribute( QStringLiteral(
"negX-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"negX" ) ] ) );
59 element.setAttribute( QStringLiteral(
"negY-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"negY" ) ] ) );
60 element.setAttribute( QStringLiteral(
"negZ-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[ QStringLiteral(
"negZ" ) ] ) );