MCPcopy Create free account
hub / github.com/PDAL/PDAL / addPoint

Method addPoint

plugins/draco/io/DracoWriter.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void DracoWriter::addPoint(DimensionInfo dim, PointRef &point, PointId idx)
386{
387 const auto pointId = draco::PointIndex((uint32_t)idx);
388
389 //find data type and create buffer
390 Dimension::Type dataType = dim.pdalDims[0].m_type;
391 size_t size = Dimension::size(dataType) * dim.pdalDims.size();
392
393 std::vector<char> buffer(size, 0);
394 //fill buffer
395 point.getPackedData(dim.pdalDims, buffer.data());
396 //add to draco pointcloud
397 draco::PointAttribute *const att = m_pc->attribute(dim.attId);
398 att->SetAttributeValue(att->mapped_index(pointId), buffer.data());
399}
400
401void DracoWriter::write(const PointViewPtr view)
402{

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected