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

Function ReadLight

code/AssetLib/SIB/SIBImporter.cpp:679–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679static void ReadLight(SIB *sib, StreamReaderLE *stream) {
680 aiLight *light = new aiLight();
681
682 while (stream->GetRemainingSizeToLimit() >= sizeof(SIBChunk)) {
683 SIBChunk chunk = ReadChunk(stream);
684 unsigned oldLimit = stream->SetReadLimit(stream->GetCurrentPos() + chunk.Size);
685
686 switch (chunk.Tag) {
687 case TAG('L', 'N', 'F', 'O'): ReadLightInfo(light, stream); break;
688 case TAG('S', 'N', 'A', 'M'): light->mName = ReadString(stream, chunk.Size / 2); break;
689 default: UnknownChunk(stream, chunk); break;
690 }
691
692 stream->SetCurrentPos(stream->GetReadLimit());
693 stream->SetReadLimit(oldLimit);
694 }
695
696 sib->lights.push_back(light);
697}
698
699// ------------------------------------------------------------------------------------------------
700static void ReadScale(aiMatrix4x4 &axis, StreamReaderLE *stream) {

Callers 1

ReadSceneFunction · 0.70

Calls 10

ReadChunkFunction · 0.85
ReadLightInfoFunction · 0.85
UnknownChunkFunction · 0.85
SetReadLimitMethod · 0.80
GetReadLimitMethod · 0.80
ReadStringFunction · 0.70
GetCurrentPosMethod · 0.45
SetCurrentPosMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected