MCPcopy Create free account
hub / github.com/LAStools/LAStools / insert

Method insert

src/lascopcindex.cpp:301–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

realloc_lasFunction · 0.85
VoxelRecordClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected