MCPcopy Create free account
hub / github.com/assimp/assimp / ReadBinaryMaterialProperty

Method ReadBinaryMaterialProperty

code/AssetLib/Assbin/AssbinLoader.cpp:441–454  ·  view source on GitHub ↗

-----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

439
440// -----------------------------------------------------------------------------------
441void AssbinImporter::ReadBinaryMaterialProperty(IOStream *stream, aiMaterialProperty *prop) {
442 if (Read<uint32_t>(stream) != ASSBIN_CHUNK_AIMATERIALPROPERTY)
443 throw DeadlyImportError("Magic chunk identifiers are wrong!");
444 /*uint32_t size =*/Read<uint32_t>(stream);
445
446 prop->mKey = Read<aiString>(stream);
447 prop->mSemantic = Read<unsigned int>(stream);
448 prop->mIndex = Read<unsigned int>(stream);
449
450 prop->mDataLength = Read<unsigned int>(stream);
451 prop->mType = (aiPropertyTypeInfo)Read<unsigned int>(stream);
452 prop->mData = new char[prop->mDataLength];
453 stream->Read(prop->mData, 1, prop->mDataLength);
454}
455
456// -----------------------------------------------------------------------------------
457void AssbinImporter::ReadBinaryMaterial(IOStream *stream, aiMaterial *mat) {

Callers

nothing calls this directly

Calls 2

DeadlyImportErrorFunction · 0.85
ReadMethod · 0.45

Tested by

no test coverage detected