42 #pragma GCC system_header
47 #include <pcl/PCLPointField.h>
48 #include <boost/mpl/assert.hpp>
53 #include <Eigen/src/StlSupport/details.h>
56 #include <type_traits>
76 template<
typename T>
struct asEnum {};
101 using type = std::remove_all_extents_t<T>;
102 static const std::uint32_t
value =
sizeof (T) /
sizeof (
type);
106 template<
typename Po
intT>
122 template<
typename Po
intT>
123 struct POD<
Eigen::internal::workaround_msvc_stl_support<PointT> >
140 template<
class Po
intT,
typename Tag,
int dummy = 0>
141 struct name :
name<typename POD<PointT>::type, Tag, dummy>
148 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
152 template<
class Po
intT,
typename Tag>
160 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
164 template<
class Po
intT,
typename Tag>
174 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
178 template<
typename Po
intT>
186 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
192 template<
typename Po
intT,
typename Tag>
217 template <
typename Po
intInT,
typename OutT>
229 const std::string &field,
232 : pt_ (reinterpret_cast<const
Pod&>(pt)), name_ (field), exists_ (exists), value_ (value)
243 const std::string &field,
245 : pt_ (reinterpret_cast<const
Pod&>(pt)), name_ (field), exists_ (exists_tmp_), value_ (value)
250 template <
typename Key>
inline void
258 value_ = static_cast<OutT> (*reinterpret_cast<const T*>(data_ptr));
264 const std::string &name_;
282 template <
typename Po
intOutT,
typename InT>
293 const std::string &field,
295 : pt_ (reinterpret_cast<
Pod&>(pt)), name_ (field), value_ (value)
300 template <
typename Key>
inline void
307 *reinterpret_cast<T*>(data_ptr) = static_cast<T> (value_);
313 const std::string &name_;
322 template <
typename Po
intT,
typename ValT>
inline void
325 std::uint8_t* data_ptr = reinterpret_cast<std::uint8_t*>(&pt) + field_offset;
326 *reinterpret_cast<ValT*>(data_ptr) = value;
334 template <
typename Po
intT,
typename ValT>
inline void
337 const std::uint8_t* data_ptr = reinterpret_cast<const std::uint8_t*>(&pt) + field_offset;
338 value = *reinterpret_cast<const ValT*>(data_ptr);
341 template <
typename ...>
using void_t = void;