| 447 | |
| 448 | |
| 449 | void PlyReader::ready(PointTableRef table) |
| 450 | { |
| 451 | m_stream = Utils::openFile(m_filename, true); |
| 452 | if (m_stream) |
| 453 | m_stream->seekg(m_dataPos); |
| 454 | for (Element& elt : m_elements) |
| 455 | { |
| 456 | if (&elt == m_vertexElt) |
| 457 | break; |
| 458 | |
| 459 | // We read an element into point 0. Since the element's properties |
| 460 | // weren't registered as dimensions, we'll try to write the data |
| 461 | // to a NULL dimension, which is a noop. |
| 462 | // This essentially just gets us to the vertex element. |
| 463 | // In binary mode, this is all silliness, since we should be able |
| 464 | // to seek right where we want to go, but in text mode, you've got |
| 465 | // to go through the data. |
| 466 | PointRef point(table, 0); |
| 467 | for (PointId idx = 0; idx < elt.m_count; ++idx) |
| 468 | readElement(elt, point); |
| 469 | } |
| 470 | m_index = 0; |
| 471 | } |
| 472 | |
| 473 | |
| 474 | bool PlyReader::processOne(PointRef& point) |
nothing calls this directly
no test coverage detected