Wrap an owned byte buffer as a zero-copy Span + BufferAnchor on the cloud.
| 56 | |
| 57 | // Wrap an owned byte buffer as a zero-copy Span + BufferAnchor on the cloud. |
| 58 | void 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 |
no test coverage detected