Applying new material members

parent 87112221
......@@ -764,7 +764,13 @@ CVAAcousticMaterial CVANetMessage::ReadAcousticMaterial()
oMaterial.sName = ReadString();
const size_t n = ReadInt();
for( size_t i = 0; i < n; i++ )
oMaterial.vfValues.push_back( ReadFloat() );
oMaterial.vfAbsorptionValues.push_back( ReadFloat() );
const size_t o = ReadInt();
for( size_t i = 0; i < o; i++ )
oMaterial.vfScatteringValues.push_back( ReadFloat() );
const size_t p = ReadInt();
for( size_t i = 0; i < p; i++ )
oMaterial.vfTransmissionValues.push_back( ReadFloat() );
return oMaterial;
}
......@@ -774,9 +780,15 @@ void CVANetMessage::WriteAcousticMaterial( const CVAAcousticMaterial& oMaterial
WriteInt( oMaterial.iType );
WriteVAStruct( oMaterial.oParams );
WriteString( oMaterial.sName );
WriteInt( ( int ) oMaterial.vfValues.size() );
for( size_t i = 0; i < oMaterial.vfValues.size(); i++ )
WriteFloat( oMaterial.vfValues[ i ] );
WriteInt( ( int ) oMaterial.vfAbsorptionValues.size() );
for( size_t i = 0; i < oMaterial.vfAbsorptionValues.size(); i++ )
WriteFloat( oMaterial.vfAbsorptionValues[ i ] );
WriteInt( ( int ) oMaterial.vfScatteringValues.size() );
for( size_t i = 0; i < oMaterial.vfScatteringValues.size(); i++ )
WriteFloat( oMaterial.vfScatteringValues[ i ] );
WriteInt( ( int ) oMaterial.vfTransmissionValues.size() );
for( size_t i = 0; i < oMaterial.vfTransmissionValues.size(); i++ )
WriteFloat( oMaterial.vfTransmissionValues[ i ] );
}
void CVANetMessage::WriteAudioRenderingModuleInfo( const CVAAudioRendererInfo& oRenderer )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment