| 191 | |
| 192 | |
| 193 | bool MemoryViewReader::processOne(PointRef& point) |
| 194 | { |
| 195 | char *base = m_incrementer(m_index); |
| 196 | if (!base) |
| 197 | return false; |
| 198 | |
| 199 | for (const FullField& f : m_fields) |
| 200 | point.setField(f.m_id, f.m_type, (void *)(base + f.m_offset)); |
| 201 | |
| 202 | if (m_shape.valid()) |
| 203 | { |
| 204 | point.setField(Dimension::Id::X, (m_index % m_xIter) / m_xDiv); |
| 205 | point.setField(Dimension::Id::Y, (m_index % m_yIter) / m_yDiv); |
| 206 | point.setField(Dimension::Id::Z, (m_index % m_zIter) / m_zDiv); |
| 207 | } |
| 208 | |
| 209 | m_index++; |
| 210 | return true; |
| 211 | } |
| 212 | |
| 213 | } // namespace pdal |
| 214 | |