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 <ostream>
25
26#include <Eigen/Core>
27
28#include "PointXYZRGBLNormal.h"
29
30namespace pcl
31{
32
33 struct EIGEN_ALIGN16 _PointXYZRGBLNormal
34 {
35 PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
37 PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
38
39 union
40 {
41 struct
42 {
43 uint32_t label;
44 float curvature;
45 };
46
47 float data_c[4];
48 };
49
50 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51 };
52
53 PCL_EXPORTS std::ostream& operator<<(std::ostream& os, const PointXYZRGBLNormal& p);
54
55 struct EIGEN_ALIGN16 PointXYZRGBLNormal : public _PointXYZRGBLNormal
56 {
58 {
59 x = p.x;
60 y = p.y;
61 z = p.z;
62 data[3] = 1.0f;
63 rgba = p.rgba;
64 normal_x = p.normal_x;
65 normal_y = p.normal_y;
66 normal_z = p.normal_z;
67 data_n[3] = 0.0f;
69 label = p.label;
70 }
71
73 {
74 x = y = z = 0.0f;
75 data[3] = 1.0f;
76 r = g = b = 0;
77 a = 255;
78 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
79 label = 0;
80 curvature = 0;
81 }
82
83 inline PointXYZRGBLNormal(uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
84 {
85 x = y = z = 0.0f;
86 data[3] = 1.0f;
87 r = _r;
88 g = _g;
89 b = _b;
90 a = 255;
91 label = _label;
92 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
93 curvature = 0;
94 }
95
96 friend std::ostream& operator<<(std::ostream& os, const PointXYZRGBLNormal& p);
97 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
98 };
99
100} // namespace pcl
uint8_t data[1]
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::ostream & operator<<(std::ostream &os, const PointXYZ &rhs)
PointXYZRGBLNormal(const _PointXYZRGBLNormal &p)
friend std::ostream & operator<<(std::ostream &os, const PointXYZRGBLNormal &p)
PointXYZRGBLNormal(uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)