| 1561 | |
| 1562 | template <typename COORDTYPE> |
| 1563 | CompressedVectorReader ReaderImpl::SetUpData3DPointsData( |
| 1564 | int64_t dataIndex, size_t count, const Data3DPointsData_t<COORDTYPE> &buffers ) const |
| 1565 | { |
| 1566 | static_assert( std::is_floating_point<COORDTYPE>::value, "Floating point type required." ); |
| 1567 | |
| 1568 | const StructureNode scan( data3D_.get( dataIndex ) ); |
| 1569 | CompressedVectorNode points( scan.get( "points" ) ); |
| 1570 | const StructureNode proto( points.prototype() ); |
| 1571 | const int64_t protoCount = proto.childCount(); |
| 1572 | std::vector<SourceDestBuffer> destBuffers; |
| 1573 | |
| 1574 | for ( int64_t protoIndex = 0; protoIndex < protoCount; protoIndex++ ) |
| 1575 | { |
| 1576 | const ustring name = proto.get( protoIndex ).elementName(); |
| 1577 | const NodeType type = proto.get( protoIndex ).type(); |
| 1578 | const bool scaled = ( type == TypeScaledInteger ); |
| 1579 | |
| 1580 | // E57_EXT_surface_normals |
| 1581 | ustring norExtUri; |
| 1582 | const bool haveNormalsExt = imf_.extensionsLookupPrefix( "nor", norExtUri ); |
| 1583 | |
| 1584 | if ( ( name == "cartesianX" ) && proto.isDefined( "cartesianX" ) && |
| 1585 | ( buffers.cartesianX != nullptr ) ) |
| 1586 | { |
| 1587 | destBuffers.emplace_back( imf_, "cartesianX", buffers.cartesianX, count, true, scaled ); |
| 1588 | } |
| 1589 | else if ( ( name == "cartesianY" ) && proto.isDefined( "cartesianY" ) && |
| 1590 | ( buffers.cartesianY != nullptr ) ) |
| 1591 | { |
| 1592 | destBuffers.emplace_back( imf_, "cartesianY", buffers.cartesianY, count, true, scaled ); |
| 1593 | } |
| 1594 | else if ( ( name == "cartesianZ" ) && proto.isDefined( "cartesianZ" ) && |
| 1595 | ( buffers.cartesianZ != nullptr ) ) |
| 1596 | { |
| 1597 | destBuffers.emplace_back( imf_, "cartesianZ", buffers.cartesianZ, count, true, scaled ); |
| 1598 | } |
| 1599 | else if ( ( name == "cartesianInvalidState" ) && |
| 1600 | proto.isDefined( "cartesianInvalidState" ) && |
| 1601 | ( buffers.cartesianInvalidState != nullptr ) ) |
| 1602 | { |
| 1603 | destBuffers.emplace_back( imf_, "cartesianInvalidState", buffers.cartesianInvalidState, |
| 1604 | count, true ); |
| 1605 | } |
| 1606 | else if ( ( name == "sphericalRange" ) && proto.isDefined( "sphericalRange" ) && |
| 1607 | ( buffers.sphericalRange != nullptr ) ) |
| 1608 | { |
| 1609 | destBuffers.emplace_back( imf_, "sphericalRange", buffers.sphericalRange, count, true, |
| 1610 | scaled ); |
| 1611 | } |
| 1612 | else if ( ( name == "sphericalAzimuth" ) && proto.isDefined( "sphericalAzimuth" ) && |
| 1613 | ( buffers.sphericalAzimuth != nullptr ) ) |
| 1614 | { |
| 1615 | destBuffers.emplace_back( imf_, "sphericalAzimuth", buffers.sphericalAzimuth, count, |
| 1616 | true, scaled ); |
| 1617 | } |
| 1618 | else if ( ( name == "sphericalElevation" ) && proto.isDefined( "sphericalElevation" ) && |
| 1619 | ( buffers.sphericalElevation != nullptr ) ) |
| 1620 | { |
nothing calls this directly
no test coverage detected