Point Cloud Library (PCL)
1.10.1
|
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;
void getFieldValue(const PointT &pt, std::size_t field_offset, ValT &value)
Get the value at a specified field in a point.
Defines all the PCL and non-PCL macros used.
This file defines compatibility wrappers for low level I/O functions.
BOOST_MPL_ASSERT_MSG((!std::is_same< PointT, typename POD< PointT >::type >::value), POINT_TYPE_NOT_PROPERLY_REGISTERED,(PointT &))
typename traits::POD< PointOutT >::type Pod
bool operator()(const pcl::PCLPointField &field)
std::remove_all_extents_t< T > type
A point structure representing Euclidean xyz coordinates, and the RGB color.
A helper functor that can set a specific value in a field if the field exists.
static const std::uint32_t value
BOOST_MPL_ASSERT_MSG((!std::is_same< PointT, typename POD< PointT >::type >::value), POINT_TYPE_NOT_PROPERLY_REGISTERED,(PointT &))
CopyIfFieldExists(const PointInT &pt, const std::string &field, bool &exists, OutT &value)
Constructor.
Tests at compile time if type T has a custom allocator.
CopyIfFieldExists(const PointInT &pt, const std::string &field, OutT &value)
Constructor.
SetIfFieldExists(PointOutT &pt, const std::string &field, const InT &value)
Constructor.
A helper functor that can copy a specific value if the given field exists.
BOOST_MPL_ASSERT_MSG((!std::is_same< PointT, typename POD< PointT >::type >::value), POINT_TYPE_NOT_PROPERLY_REGISTERED,(PointT &))
typename traits::POD< PointInT >::type Pod
void operator()()
Operator.
void setFieldValue(PointT &pt, std::size_t field_offset, const ValT &value)
Set the value at a specified field in a point.
void operator()()
Operator.
BOOST_MPL_ASSERT_MSG((!std::is_same< PointT, typename POD< PointT >::type >::value), POINT_TYPE_NOT_PROPERLY_REGISTERED,(PointT &))