39 #ifndef PCL_IMPL_POINT_TYPES_HPP_
40 #define PCL_IMPL_POINT_TYPES_HPP_
43 # pragma GCC system_header
50 #define PCL_POINT_TYPES \
60 (pcl::InterestPoint) \
64 (pcl::PointXYZRGBNormal) \
65 (pcl::PointXYZINormal) \
66 (pcl::PointWithRange) \
67 (pcl::PointWithViewpoint) \
68 (pcl::MomentInvariants) \
69 (pcl::PrincipalRadiiRSD) \
71 (pcl::PrincipalCurvatures) \
72 (pcl::PFHSignature125) \
73 (pcl::PFHRGBSignature250) \
75 (pcl::CPPFSignature) \
76 (pcl::PPFRGBSignature) \
77 (pcl::NormalBasedSignature12) \
78 (pcl::FPFHSignature33) \
79 (pcl::VFHSignature308) \
80 (pcl::ESFSignature640) \
82 (pcl::IntensityGradient) \
83 (pcl::PointWithScale) \
85 (pcl::ShapeContext1980) \
92 #define PCL_RGB_POINT_TYPES \
96 (pcl::PointXYZRGBNormal) \
100 #define PCL_XYZ_POINT_TYPES \
104 (pcl::PointXYZRGBA) \
106 (pcl::PointXYZRGBL) \
108 (pcl::InterestPoint) \
110 (pcl::PointXYZRGBNormal) \
111 (pcl::PointXYZINormal) \
112 (pcl::PointWithRange) \
113 (pcl::PointWithViewpoint) \
114 (pcl::PointWithScale) \
118 #define PCL_XYZL_POINT_TYPES \
123 #define PCL_NORMAL_POINT_TYPES \
126 (pcl::PointXYZRGBNormal) \
127 (pcl::PointXYZINormal) \
131 #define PCL_FEATURE_POINT_TYPES \
132 (pcl::PFHSignature125) \
133 (pcl::PFHRGBSignature250) \
134 (pcl::PPFSignature) \
135 (pcl::CPPFSignature) \
136 (pcl::PPFRGBSignature) \
137 (pcl::NormalBasedSignature12) \
138 (pcl::FPFHSignature33) \
139 (pcl::VFHSignature308) \
140 (pcl::ESFSignature640) \
148 typedef Eigen::Map<Eigen::Array4f, Eigen::Aligned>
Array4fMap;
162 #define PCL_ADD_UNION_POINT4D \
163 union EIGEN_ALIGN16 { \
172 #define PCL_ADD_EIGEN_MAPS_POINT4D \
173 inline pcl::Vector3fMap getVector3fMap () { return (pcl::Vector3fMap (data)); } \
174 inline pcl::Vector3fMapConst getVector3fMap () const { return (pcl::Vector3fMapConst (data)); } \
175 inline pcl::Vector4fMap getVector4fMap () { return (pcl::Vector4fMap (data)); } \
176 inline pcl::Vector4fMapConst getVector4fMap () const { return (pcl::Vector4fMapConst (data)); } \
177 inline pcl::Array3fMap getArray3fMap () { return (pcl::Array3fMap (data)); } \
178 inline pcl::Array3fMapConst getArray3fMap () const { return (pcl::Array3fMapConst (data)); } \
179 inline pcl::Array4fMap getArray4fMap () { return (pcl::Array4fMap (data)); } \
180 inline pcl::Array4fMapConst getArray4fMap () const { return (pcl::Array4fMapConst (data)); }
182 #define PCL_ADD_POINT4D \
183 PCL_ADD_UNION_POINT4D \
184 PCL_ADD_EIGEN_MAPS_POINT4D
186 #define PCL_ADD_UNION_NORMAL4D \
187 union EIGEN_ALIGN16 { \
197 #define PCL_ADD_EIGEN_MAPS_NORMAL4D \
198 inline pcl::Vector3fMap getNormalVector3fMap () { return (pcl::Vector3fMap (data_n)); } \
199 inline pcl::Vector3fMapConst getNormalVector3fMap () const { return (pcl::Vector3fMapConst (data_n)); } \
200 inline pcl::Vector4fMap getNormalVector4fMap () { return (pcl::Vector4fMap (data_n)); } \
201 inline pcl::Vector4fMapConst getNormalVector4fMap () const { return (pcl::Vector4fMapConst (data_n)); }
203 #define PCL_ADD_NORMAL4D \
204 PCL_ADD_UNION_NORMAL4D \
205 PCL_ADD_EIGEN_MAPS_NORMAL4D
207 #define PCL_ADD_UNION_RGB \
224 #define PCL_ADD_EIGEN_MAPS_RGB \
225 inline Eigen::Vector3i getRGBVector3i () { return (Eigen::Vector3i (r, g, b)); } \
226 inline const Eigen::Vector3i getRGBVector3i () const { return (Eigen::Vector3i (r, g, b)); } \
227 inline Eigen::Vector4i getRGBVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
228 inline const Eigen::Vector4i getRGBVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
229 inline Eigen::Vector4i getRGBAVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
230 inline const Eigen::Vector4i getRGBAVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
231 inline pcl::Vector3cMap getBGRVector3cMap () { return (pcl::Vector3cMap (reinterpret_cast<uint8_t*> (&rgba))); } \
232 inline pcl::Vector3cMapConst getBGRVector3cMap () const { return (pcl::Vector3cMapConst (reinterpret_cast<const uint8_t*> (&rgba))); } \
233 inline pcl::Vector4cMap getBGRAVector4cMap () { return (pcl::Vector4cMap (reinterpret_cast<uint8_t*> (&rgba))); } \
234 inline pcl::Vector4cMapConst getBGRAVector4cMap () const { return (pcl::Vector4cMapConst (reinterpret_cast<const uint8_t*> (&rgba))); }
236 #define PCL_ADD_RGB \
238 PCL_ADD_EIGEN_MAPS_RGB
240 #define PCL_ADD_INTENSITY \
246 #define PCL_ADD_INTENSITY_8U \
252 #define PCL_ADD_INTENSITY_32U \
255 uint32_t intensity; \
263 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
274 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
285 x = _x; y = _y; z = _z;
290 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
302 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const RGB& p);
334 friend std::ostream&
operator << (std::ostream& os,
const RGB& p);
352 intensity = p.intensity;
378 intensity = p.intensity;
386 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
387 operator unsigned char()
const
410 intensity = p.intensity;
435 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
438 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZI& p);
443 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
467 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
475 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
490 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Label& p);
503 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
531 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
551 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
559 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
598 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
619 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
623 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZRGBL& p);
628 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
641 inline PointXYZRGBL (uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
653 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
670 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
673 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZHSV& p);
678 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
679 h = p.
h; s = p.
s; v = p.
v;
686 h = s = v = data_c[3] = 0;
692 h = _h; v = _v; s = _s;
697 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
702 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXY& p);
742 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
758 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
761 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Normal& p);
769 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
776 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
780 inline Normal (
float n_x,
float n_y,
float n_z)
782 normal_x = n_x; normal_y = n_y; normal_z = n_z;
788 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
795 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
798 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Axis& p);
806 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
812 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
815 inline Axis (
float n_x,
float n_y,
float n_z)
817 normal_x = n_x; normal_y = n_y; normal_z = n_z;
822 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
838 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
841 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointNormal& p);
849 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
850 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
858 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
879 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
916 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
917 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
927 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
947 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
950 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZINormal& p);
958 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
959 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
968 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
987 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
990 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointWithRange& p);
998 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1026 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1029 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointWithViewpoint& p);
1037 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1042 float _vp_x = 0.0f,
float _vp_y = 0.0f,
float _vp_z = 0.0f)
1044 x = _x; y = _y; z = _z;
1046 vp_x = _vp_x; vp_y = _vp_y; vp_z = _vp_z;
1052 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const MomentInvariants& p);
1082 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
1083 operator unsigned char()
const
1092 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PrincipalCurvatures& p);
1126 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PFHRGBSignature250& p);
1138 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PPFSignature& p);
1201 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const SHOT352& p);
1215 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const SHOT1344& p);
1246 inline const Eigen::Map<const Eigen::Vector3f>
getXAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (x_axis)); }
1248 inline const Eigen::Map<const Eigen::Vector3f>
getYAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (y_axis)); }
1250 inline const Eigen::Map<const Eigen::Vector3f>
getZAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (z_axis)); }
1251 inline Eigen::Map<Eigen::Matrix3f>
getMatrix3fMap () {
return (Eigen::Matrix3f::Map (rf)); }
1252 inline const Eigen::Map<const Eigen::Matrix3f>
getMatrix3fMap ()
const {
return (Eigen::Matrix3f::Map (rf)); }
1254 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1257 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const ReferenceFrame& p);
1262 for (
int d = 0; d < 9; ++d)
1268 for (
int d = 0; d < 3; ++d)
1269 x_axis[d] = y_axis[d] = z_axis[d] = 0;
1273 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1277 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const FPFHSignature33& p);
1289 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const VFHSignature308& p);
1301 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const ESFSignature640& p);
1313 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const GFPFHSignature16& p);
1325 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Narf36& p);
1338 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const BorderDescription& p);
1369 friend std::ostream&
operator << (std::ostream& os,
const IntensityGradient& p);
1400 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1411 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1440 inline PointWithScale (
float _x,
float _y,
float _z,
float _scale,
float _angle,
float _response,
int _octave)
1472 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1483 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1494 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
1502 template <
int N> std::ostream&
1503 operator << (std::ostream& os, const Histogram<N>& p)
1505 for (
int i = 0; i < N; ++i)
1506 os << (i == 0 ?
"(" :
"") << p.histogram[i] << (i < N-1 ?
", " :
")");
1512 #include <pcl/common/point_tests.h>