| 299 | // Desallocation is performed manually with clean() at appropriate places. |
| 300 | |
| 301 | void insert(const U8* buffer, const I32 cell, const U16 chunk) |
| 302 | { |
| 303 | if (point_count == point_capacity) |
| 304 | { |
| 305 | point_capacity *= 2; |
| 306 | point_buffer = (U8*)realloc_las(point_buffer, (size_t)point_capacity * (size_t)point_size); |
| 307 | } |
| 308 | |
| 309 | memcpy(point_buffer + (size_t)point_count * (size_t)point_size, buffer, point_size); |
| 310 | |
| 311 | // cell = -1 means that recording the location of the point is useless (save memory) |
| 312 | if (cell >= 0) occupancy.insert({ cell, VoxelRecord(chunk, point_count) }); |
| 313 | |
| 314 | point_count++; |
| 315 | }; |
| 316 | |
| 317 | void insert(const LASpoint* laspoint, const I32 cell, const U16 chunk) |
| 318 | { |
nothing calls this directly
no test coverage detected