PointXYZRGBLNormal.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ROBDEKON::ArmarXObjects::DenseCRFSegmentationProcessor
17  * @author Christoph Pohl ( christoph dot pohl at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 
24 #include "PointXYZRGBLNormal.h"
25 
26 #include <Eigen/Core>
27 #include <ostream>
28 
29 namespace pcl
30 {
31 
32  struct EIGEN_ALIGN16 _PointXYZRGBLNormal
33  {
34  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
36  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
37  union
38  {
39  struct
40  {
41  uint32_t label;
42  float curvature;
43  };
44  float data_c[4];
45  };
46  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
47  };
48 
49  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBLNormal& p);
50  struct EIGEN_ALIGN16 PointXYZRGBLNormal : public _PointXYZRGBLNormal
51  {
53  {
54  x = p.x;
55  y = p.y;
56  z = p.z;
57  data[3] = 1.0f;
58  rgba = p.rgba;
59  normal_x = p.normal_x;
60  normal_y = p.normal_y;
61  normal_z = p.normal_z;
62  data_n[3] = 0.0f;
63  curvature = p.curvature;
64  label = p.label;
65  }
66 
68  {
69  x = y = z = 0.0f;
70  data[3] = 1.0f;
71  r = g = b = 0;
72  a = 255;
73  normal_x = normal_y = normal_z = data_n[3] = 0.0f;
74  label = 0;
75  curvature = 0;
76  }
77  inline PointXYZRGBLNormal(uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
78  {
79  x = y = z = 0.0f;
80  data[3] = 1.0f;
81  r = _r;
82  g = _g;
83  b = _b;
84  a = 255;
85  label = _label;
86  normal_x = normal_y = normal_z = data_n[3] = 0.0f;
87  curvature = 0;
88  }
89 
90  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBLNormal& p);
91  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
92  };
93 
94 }
pcl
Definition: pcl_point_operators.cpp:4
pcl::_PointXYZRGBLNormal::curvature
float curvature
Definition: PointXYZRGBLNormal.hpp:42
pcl::PointXYZRGBLNormal
Definition: PointXYZRGBLNormal.hpp:50
pcl::_PointXYZRGBLNormal::PCL_ADD_NORMAL4D
PCL_ADD_NORMAL4D
Definition: PointXYZRGBLNormal.hpp:36
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
pcl::operator<<
std::ostream & operator<<(std::ostream &os, const PointXYZ &rhs)
Definition: pcl_point_operators.cpp:38
pcl::PointXYZRGBLNormal::PointXYZRGBLNormal
PointXYZRGBLNormal(const _PointXYZRGBLNormal &p)
Definition: PointXYZRGBLNormal.hpp:52
pcl::PointXYZRGBLNormal::PointXYZRGBLNormal
PointXYZRGBLNormal(uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
Definition: PointXYZRGBLNormal.hpp:77
pcl::PointXYZRGBLNormal::PointXYZRGBLNormal
PointXYZRGBLNormal()
Definition: PointXYZRGBLNormal.hpp:67
PointXYZRGBLNormal.h
pcl::_PointXYZRGBLNormal
Definition: PointXYZRGBLNormal.hpp:32
pcl::_PointXYZRGBLNormal::PCL_ADD_RGB
PCL_ADD_RGB
Definition: PointXYZRGBLNormal.hpp:35
pcl::_PointXYZRGBLNormal::PCL_ADD_POINT4D
PCL_ADD_POINT4D
Definition: PointXYZRGBLNormal.hpp:34
pcl::_PointXYZRGBLNormal::label
uint32_t label
Definition: PointXYZRGBLNormal.hpp:41