Point Cloud Library (PCL) 1.12.0
Loading...
Searching...
No Matches
PCLPointField.h
1#pragma once
2
3#include <pcl/memory.h> // for shared_ptr
4#include <pcl/type_traits.h> // for asEnum_v
5#include <pcl/types.h> // for index_t
6
7#include <string> // for string
8#include <ostream> // for ostream
9
10namespace pcl
11{
33
36
37 inline std::ostream& operator<<(std::ostream& s, const ::pcl::PCLPointField & v)
38 {
39 s << "name: ";
40 s << " " << v.name << std::endl;
41 s << "offset: ";
42 s << " " << v.offset << std::endl;
43 s << "datatype: ";
44 s << " " << v.datatype << std::endl;
45 s << "count: ";
46 s << " " << v.count << std::endl;
47 return (s);
48 }
49
50 // Return true if the PCLPointField matches the expected name and data type.
51 // Written as a struct to allow partially specializing on Tag.
52 template<typename PointT, typename Tag>
54 {
55 bool operator() (const PCLPointField& field)
56 {
57 return ((field.name == traits::name<PointT, Tag>::value) &&
58 (field.datatype == traits::datatype<PointT, Tag>::value) &&
59 ((field.count == traits::datatype<PointT, Tag>::size) ||
60 (field.count == 0 && traits::datatype<PointT, Tag>::size == 1 /* see bug #821 */)));
61 }
62 };
63
64} // namespace pcl
65
Defines functions, macros and traits for allocating and using memory.
static constexpr std::uint8_t asEnum_v
Definition type_traits.h:92
PCLPointField::Ptr PCLPointFieldPtr
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
PCLPointField::ConstPtr PCLPointFieldConstPtr
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
Definition types.h:120
bool operator()(const PCLPointField &field)
shared_ptr< const ::pcl::PCLPointField > ConstPtr
std::uint8_t datatype
shared_ptr< ::pcl::PCLPointField > Ptr
Defines basic non-point types used by PCL.