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::PPFRGBSignature) \
76 (pcl::NormalBasedSignature12) \
77 (pcl::FPFHSignature33) \
78 (pcl::VFHSignature308) \
79 (pcl::ESFSignature640) \
81 (pcl::IntensityGradient) \
82 (pcl::PointWithScale) \
84 (pcl::ShapeContext1980) \
91 #define PCL_RGB_POINT_TYPES \
95 (pcl::PointXYZRGBNormal) \
99 #define PCL_XYZ_POINT_TYPES \
103 (pcl::PointXYZRGBA) \
105 (pcl::PointXYZRGBL) \
107 (pcl::InterestPoint) \
109 (pcl::PointXYZRGBNormal) \
110 (pcl::PointXYZINormal) \
111 (pcl::PointWithRange) \
112 (pcl::PointWithViewpoint) \
113 (pcl::PointWithScale) \
117 #define PCL_XYZL_POINT_TYPES \
122 #define PCL_NORMAL_POINT_TYPES \
125 (pcl::PointXYZRGBNormal) \
126 (pcl::PointXYZINormal) \
130 #define PCL_FEATURE_POINT_TYPES \
131 (pcl::PFHSignature125) \
132 (pcl::PFHRGBSignature250) \
133 (pcl::PPFSignature) \
134 (pcl::PPFRGBSignature) \
135 (pcl::NormalBasedSignature12) \
136 (pcl::FPFHSignature33) \
137 (pcl::VFHSignature308) \
138 (pcl::ESFSignature640) \
144 #define PCL_ADD_POINT4D \
145 union EIGEN_ALIGN16 { \
153 inline Eigen::Map<Eigen::Vector3f> getVector3fMap () { return (Eigen::Vector3f::Map (data)); } \
154 inline const Eigen::Map<const Eigen::Vector3f> getVector3fMap () const { return (Eigen::Vector3f::Map (data)); } \
155 inline Eigen::Map<Eigen::Vector4f, Eigen::Aligned> getVector4fMap () { return (Eigen::Vector4f::MapAligned (data)); } \
156 inline const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> getVector4fMap () const { return (Eigen::Vector4f::MapAligned (data)); } \
157 inline Eigen::Map<Eigen::Array3f> getArray3fMap () { return (Eigen::Array3f::Map (data)); } \
158 inline const Eigen::Map<const Eigen::Array3f> getArray3fMap () const { return (Eigen::Array3f::Map (data)); } \
159 inline Eigen::Map<Eigen::Array4f, Eigen::Aligned> getArray4fMap () { return (Eigen::Array4f::MapAligned (data)); } \
160 inline const Eigen::Map<const Eigen::Array4f, Eigen::Aligned> getArray4fMap () const { return (Eigen::Array4f::MapAligned (data)); }
162 #define PCL_ADD_NORMAL4D \
163 union EIGEN_ALIGN16 { \
172 inline Eigen::Map<Eigen::Vector3f> getNormalVector3fMap () { return (Eigen::Vector3f::Map (data_n)); } \
173 inline const Eigen::Map<const Eigen::Vector3f> getNormalVector3fMap () const { return (Eigen::Vector3f::Map (data_n)); } \
174 inline Eigen::Map<Eigen::Vector4f, Eigen::Aligned> getNormalVector4fMap () { return (Eigen::Vector4f::MapAligned (data_n)); } \
175 inline const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> getNormalVector4fMap () const { return (Eigen::Vector4f::MapAligned (data_n)); }
177 #define PCL_ADD_RGB \
194 #define PCL_ADD_INTENSITY \
200 #define PCL_ADD_INTENSITY_8U \
206 #define PCL_ADD_INTENSITY_32U \
209 uint32_t intensity; \
214 typedef Eigen::Map<Eigen::Array4f, Eigen::Aligned>
Array4fMap;
226 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
237 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
248 x = _x; y = _y; z = _z;
253 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
265 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const RGB& p);
297 friend std::ostream&
operator << (std::ostream& os,
const RGB& p);
315 intensity = p.intensity;
341 intensity = p.intensity;
366 intensity = p.intensity;
391 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
394 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZI& p);
399 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
423 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
431 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
446 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Label& p);
459 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
487 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
497 inline Eigen::Vector3i getRGBVector3i ()
499 return (Eigen::Vector3i (r, g, b));
501 inline const Eigen::Vector3i
getRGBVector3i ()
const {
return (Eigen::Vector3i (r, g, b)); }
502 inline Eigen::Vector4i getRGBVector4i ()
504 return (Eigen::Vector4i (r, g, b, a));
506 inline const Eigen::Vector4i
getRGBVector4i ()
const {
return (Eigen::Vector4i (r, g, b, a)); }
516 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
524 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
563 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
583 inline Eigen::Vector3i getRGBVector3i ()
585 return (Eigen::Vector3i (r, g, b));
587 inline const Eigen::Vector3i
getRGBVector3i ()
const {
return (Eigen::Vector3i (r, g, b)); }
588 inline Eigen::Vector4i getRGBVector4i ()
590 return (Eigen::Vector4i (r, g, b, a));
592 inline const Eigen::Vector4i
getRGBVector4i ()
const {
return (Eigen::Vector4i (r, g, b, a)); }
596 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
600 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZRGBL& p);
605 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
618 inline PointXYZRGBL (uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
630 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
647 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
650 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZHSV& p);
655 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
656 h = p.
h; s = p.
s; v = p.
v;
663 h = s = v = data_c[3] = 0;
669 h = _h; v = _v; s = _s;
674 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
679 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXY& p);
719 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
735 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
738 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Normal& p);
746 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
753 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
757 inline Normal (
float n_x,
float n_y,
float n_z)
759 normal_x = n_x; normal_y = n_y; normal_z = n_z;
765 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
772 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
775 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Axis& p);
783 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
789 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
792 inline Axis (
float n_x,
float n_y,
float n_z)
794 normal_x = n_x; normal_y = n_y; normal_z = n_z;
799 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
815 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
818 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointNormal& p);
826 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
827 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
835 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
867 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
870 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZRGBNormal& p);
904 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
905 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
915 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
921 return (Eigen::Vector3i (
r,
g,
b));
926 return (Eigen::Vector4i (
r,
g,
b,
a));
946 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
949 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointXYZINormal& p);
957 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
958 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
967 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
986 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
989 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointWithRange& p);
997 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1025 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1028 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointWithViewpoint& p);
1036 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1041 float _vp_x = 0.0f,
float _vp_y = 0.0f,
float _vp_z = 0.0f)
1043 x = _x; y = _y; z = _z;
1045 vp_x = _vp_x; vp_y = _vp_y; vp_z = _vp_z;
1051 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const MomentInvariants& p);
1221 inline const Eigen::Map<const Eigen::Vector3f>
getXAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (x_axis)); }
1223 inline const Eigen::Map<const Eigen::Vector3f>
getYAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (y_axis)); }
1225 inline const Eigen::Map<const Eigen::Vector3f>
getZAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (z_axis)); }
1226 inline Eigen::Map<Eigen::Matrix3f>
getMatrix3fMap () {
return (Eigen::Matrix3f::Map (rf)); }
1227 inline const Eigen::Map<const Eigen::Matrix3f>
getMatrix3fMap ()
const {
return (Eigen::Matrix3f::Map (rf)); }
1229 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1232 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const ReferenceFrame& p);
1237 for (
int d = 0; d < 9; ++d)
1243 for (
int d = 0; d < 3; ++d)
1244 x_axis[d] = y_axis[d] = z_axis[d] = 0;
1248 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1252 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const FPFHSignature33& p);
1297 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const Narf36& p);
1340 friend std::ostream&
operator << (std::ostream& os,
const IntensityGradient& p);
1370 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1381 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1410 inline PointWithScale (
float _x,
float _y,
float _z,
float _scale,
float _angle,
float _response,
int _octave)
1453 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1456 PCL_EXPORTS std::ostream&
operator << (std::ostream& os,
const PointSurfel& p);
1464 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1475 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
1483 template <
int N> std::ostream&
1484 operator << (std::ostream& os, const Histogram<N>& p)
1486 for (
int i = 0; i < N; ++i)
1487 os << (i == 0 ?
"(" :
"") << p.histogram[i] << (i < N-1 ?
", " :
")");
1493 #include <pcl/common/point_tests.h>