MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / deserialize

Method deserialize

openpgl/spatial/KNN.h:486–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484 }
485
486 void deserialize(std::istream &stream)
487 {
488 stream.read(reinterpret_cast<char *>(&_isBuild), sizeof(bool));
489 if (_isBuild)
490 {
491 stream.read(reinterpret_cast<char *>(&num_points), sizeof(uint32_t));
492 points = (Point *)alignedMalloc(num_points * sizeof(Point), 32);
493 for (uint32_t n = 0; n < num_points; n++)
494 {
495 Point p;
496 stream.read(reinterpret_cast<char *>(&p), sizeof(Point));
497 points[n] = p;
498 }
499
500 index = std::unique_ptr<Index>(new Index(3, *this, 10));
501 }
502 }
503
504 std::string toString() const
505 {

Callers

nothing calls this directly

Calls 1

alignedMallocFunction · 0.50

Tested by

no test coverage detected