41 #include <pcl/conversions.h> 43 #include <type_traits> 50 template<
typename Po
intInT,
typename Po
intOutT>
53 using PodIn =
typename traits::POD<PointInT>::type;
54 using PodOut =
typename traits::POD<PointOutT>::type;
57 : p1_ (reinterpret_cast<const
PodIn&> (p1))
58 , p2_ (reinterpret_cast<
PodOut&> (p2)) { }
60 template<
typename Key>
inline void 65 using InT =
typename pcl::traits::datatype<PointInT, Key>::type;
66 using OutT =
typename pcl::traits::datatype<PointOutT, Key>::type;
68 BOOST_MPL_ASSERT_MSG ((std::is_same<InT, OutT>::value),
69 POINT_IN_AND_POINT_OUT_HAVE_DIFFERENT_TYPES_FOR_FIELD,
70 (Key, PointInT&, InT, PointOutT&, OutT));
71 memcpy (reinterpret_cast<std::uint8_t*>(&p2_) + pcl::traits::offset<PointOutT, Key>::value,
72 reinterpret_cast<const std::uint8_t*>(&p1_) + pcl::traits::offset<PointInT, Key>::value,
NdConcatenateFunctor(const PointInT &p1, PointOutT &p2)
typename traits::POD< PointInT >::type PodIn
typename traits::POD< PointOutT >::type PodOut
Helper functor structure for concatenate.