OpenFlight-plugin with Surface Material Codes. There is one additional field that may be required by an existing application in addition to the IR Code is the IR Material. I have a small fix to include the IR Material as the User Value <UA:IRM>

This commit is contained in:
Tony Vasile 2016-05-30 12:41:25 +01:00 committed by Robert Osfield
parent 260cbab518
commit 759b537250

View File

@ -362,7 +362,7 @@ protected:
int materialIndex = in.readInt16(-1);
int16 surface = in.readInt16();
int16 feature = in.readInt16();
/*int32 IRMaterial =*/ in.readInt32(-1);
int32 IRMaterial = in.readInt32();
_transparency = in.readUInt16(0);
// version > 13
/*uint8 influenceLOD =*/ in.readUInt8();
@ -457,6 +457,12 @@ protected:
_geometry->setUserValue("<UA:IRC>", IRColor);
}
// IR Material ID (IRM)
if (document.getPreserveNonOsgAttrsAsUserData() && 0 != IRMaterial)
{
_geometry->setUserValue("<UA:IRM>", IRMaterial);
}
// surface (SMC)
if (document.getPreserveNonOsgAttrsAsUserData() && 0 != surface)
{