| 677 | } |
| 678 | |
| 679 | static 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 | // ------------------------------------------------------------------------------------------------ |
| 700 | static void ReadScale(aiMatrix4x4 &axis, StreamReaderLE *stream) { |
no test coverage detected