| 1157 | |
| 1158 | template <typename COORDTYPE> |
| 1159 | CompressedVectorWriter WriterImpl::SetUpData3DPointsData( |
| 1160 | int64_t dataIndex, size_t count, const Data3DPointsData_t<COORDTYPE> &buffers ) |
| 1161 | { |
| 1162 | static_assert( std::is_floating_point<COORDTYPE>::value, "Floating point type required." ); |
| 1163 | |
| 1164 | const StructureNode scan( data3D_.get( dataIndex ) ); |
| 1165 | CompressedVectorNode points( scan.get( "points" ) ); |
| 1166 | const StructureNode proto( points.prototype() ); |
| 1167 | std::vector<SourceDestBuffer> sourceBuffers; |
| 1168 | |
| 1169 | if ( proto.isDefined( "cartesianX" ) && ( buffers.cartesianX != nullptr ) ) |
| 1170 | { |
| 1171 | sourceBuffers.emplace_back( imf_, "cartesianX", buffers.cartesianX, count, true, true ); |
| 1172 | } |
| 1173 | |
| 1174 | if ( proto.isDefined( "cartesianY" ) && ( buffers.cartesianY != nullptr ) ) |
| 1175 | { |
| 1176 | sourceBuffers.emplace_back( imf_, "cartesianY", buffers.cartesianY, count, true, true ); |
| 1177 | } |
| 1178 | |
| 1179 | if ( proto.isDefined( "cartesianZ" ) && ( buffers.cartesianZ != nullptr ) ) |
| 1180 | { |
| 1181 | sourceBuffers.emplace_back( imf_, "cartesianZ", buffers.cartesianZ, count, true, true ); |
| 1182 | } |
| 1183 | |
| 1184 | if ( proto.isDefined( "sphericalRange" ) && ( buffers.sphericalRange != nullptr ) ) |
| 1185 | { |
| 1186 | sourceBuffers.emplace_back( imf_, "sphericalRange", buffers.sphericalRange, count, true, |
| 1187 | true ); |
| 1188 | } |
| 1189 | |
| 1190 | if ( proto.isDefined( "sphericalAzimuth" ) && ( buffers.sphericalAzimuth != nullptr ) ) |
| 1191 | { |
| 1192 | sourceBuffers.emplace_back( imf_, "sphericalAzimuth", buffers.sphericalAzimuth, count, |
| 1193 | true, true ); |
| 1194 | } |
| 1195 | |
| 1196 | if ( proto.isDefined( "sphericalElevation" ) && ( buffers.sphericalElevation != nullptr ) ) |
| 1197 | { |
| 1198 | sourceBuffers.emplace_back( imf_, "sphericalElevation", buffers.sphericalElevation, count, |
| 1199 | true, true ); |
| 1200 | } |
| 1201 | |
| 1202 | if ( proto.isDefined( "intensity" ) && ( buffers.intensity != nullptr ) ) |
| 1203 | { |
| 1204 | sourceBuffers.emplace_back( imf_, "intensity", buffers.intensity, count, true, true ); |
| 1205 | } |
| 1206 | |
| 1207 | if ( proto.isDefined( "colorRed" ) && ( buffers.colorRed != nullptr ) ) |
| 1208 | { |
| 1209 | sourceBuffers.emplace_back( imf_, "colorRed", buffers.colorRed, count, true ); |
| 1210 | } |
| 1211 | |
| 1212 | if ( proto.isDefined( "colorGreen" ) && ( buffers.colorGreen != nullptr ) ) |
| 1213 | { |
| 1214 | sourceBuffers.emplace_back( imf_, "colorGreen", buffers.colorGreen, count, true ); |
| 1215 | } |
| 1216 |
nothing calls this directly
no test coverage detected