MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / adoptBuffer

Function adoptBuffer

pj_scene3D/core/src/pointcloud_codecs.cpp:58–62  ·  view source on GitHub ↗

Wrap an owned byte buffer as a zero-copy Span + BufferAnchor on the cloud.

Source from the content-addressed store, hash-verified

56
57// Wrap an owned byte buffer as a zero-copy Span + BufferAnchor on the cloud.
58void adoptBuffer(PJ::sdk::PointCloud& out, std::vector<uint8_t>&& bytes) {
59 auto owned = std::make_shared<std::vector<uint8_t>>(std::move(bytes));
60 out.data = PJ::Span<const uint8_t>(owned->data(), owned->size());
61 out.anchor = owned;
62}
63
64// Per-component field names for a Draco attribute. Named attributes
65// (POSITION/NORMAL/COLOR/TEX_COORD) use their canonical component names. Everything

Callers 2

decodeCloudiniFunction · 0.85
decodeDracoFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected