| 37 | } |
| 38 | |
| 39 | void Header::fill(const char *buf, size_t bufsize) |
| 40 | { |
| 41 | LeExtractor s(buf, bufsize); |
| 42 | |
| 43 | s.get(magic, 4); |
| 44 | s >> fileSourceId >> globalEncoding; |
| 45 | |
| 46 | char guidBuf[Uuid::size()]; |
| 47 | s.get(guidBuf, Uuid::size()); |
| 48 | projectGuid.unpack(guidBuf); |
| 49 | |
| 50 | s >> versionMajor >> versionMinor; |
| 51 | s.get(systemId, 32); |
| 52 | s.get(softwareId, 32); |
| 53 | s >> creationDoy >> creationYear; |
| 54 | s >> headerSize >> pointOffset >> vlrCount; |
| 55 | s >> pointFormatBits >> pointSize >> legacyPointCount; |
| 56 | |
| 57 | for (uint32_t& pbr : legacyPointsByReturn) |
| 58 | s >> pbr; |
| 59 | |
| 60 | s >> scale.x >> scale.y >> scale.z; |
| 61 | s >> offset.x >> offset.y >> offset.z; |
| 62 | s >> bounds.maxx >> bounds.minx >> bounds.maxy >> bounds.miny >> bounds.maxz >> bounds.minz; |
| 63 | if (versionMinor >= 3) |
| 64 | { |
| 65 | s >> waveOffset; |
| 66 | if (versionMinor >= 4) |
| 67 | { |
| 68 | s >> evlrOffset >> evlrCount >> ePointCount; |
| 69 | for (uint64_t& pbr : ePointsByReturn) |
| 70 | s >> pbr; |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | std::vector<char> Header::data() const |
| 76 | { |
no test coverage detected