Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef PCL_APPS_IN_HAND_SCANNER_IMPL_COMMON_TYPES_HPP
00042 #define PCL_APPS_IN_HAND_SCANNER_IMPL_COMMON_TYPES_HPP
00043
00044 #include <limits>
00045
00046 namespace pcl
00047 {
00048 namespace ihs
00049 {
00050 struct EIGEN_ALIGN16 _PointIHS
00051 {
00052 PCL_ADD_POINT4D
00053 PCL_ADD_NORMAL4D
00054 PCL_ADD_RGB
00055 float weight;
00056 unsigned int age;
00057 uint32_t directions;
00058
00059 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00060 };
00061
00062 struct PointIHS : public pcl::ihs::_PointIHS
00063 {
00064
00065 inline PointIHS ()
00066 {
00067 this->x = this->y = this->z = std::numeric_limits<float>::quiet_NaN ();
00068 this->data[3] = 1.f;
00069
00070 this->normal_x = this->normal_y = this->normal_z = std::numeric_limits<float>::quiet_NaN ();
00071 this->data_n[3] = 0.f;
00072
00073 this->b = this->g = this->r = 0; this->a = 255;
00074
00075 this->weight = 0.f;
00076 this->age = 0;
00077 this->directions = 0;
00078 }
00079
00080 inline PointIHS (const PointIHS& other)
00081 {
00082 this->x = other.x;
00083 this->y = other.y;
00084 this->z = other.z;
00085 this->data[3] = other.data[3];
00086
00087 this->normal_x = other.normal_x;
00088 this->normal_y = other.normal_y;
00089 this->normal_z = other.normal_z;
00090 this->data_n[3] = other.data_n[3];
00091
00092 this->rgba = other.rgba;
00093
00094 this->weight = other.weight;
00095 this->age = other.age;
00096 this->directions = other.directions;
00097 }
00098
00099 inline PointIHS (const pcl::PointXYZRGBNormal& other, const float weight)
00100 {
00101 this->x = other.x;
00102 this->y = other.y;
00103 this->z = other.z;
00104 this->data[3] = other.data[3];
00105
00106 this->normal_x = other.normal_x;
00107 this->normal_y = other.normal_y;
00108 this->normal_z = other.normal_z;
00109 this->data_n[3] = other.data_n[3];
00110
00111 this->rgba = other.rgba;
00112
00113 this->weight = weight;
00114 this->age = 0;
00115 this->directions = 0;
00116 }
00117
00118
00119 inline const Eigen::Vector3i getRGBVector3i () const {return (Eigen::Vector3i (r, g, b));}
00120
00121 inline const Eigen::Vector4i getRGBVector4i () const {return (Eigen::Vector4i (r, g, b, a));}
00122 };
00123
00124 }
00125 }
00126
00127 #endif // PCL_APPS_IN_HAND_SCANNER_IMPL_COMMON_TYPES_HPP