@@ -61,7 +61,7 @@ class OpenNIOrganizedEdgeDetection {
61
61
viewer->setSize (640 , 480 );
62
62
viewer->addPointCloud <PointT>(cloud, " cloud" );
63
63
viewer->setPointCloudRenderingProperties (
64
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1 , " cloud" );
64
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE, 1 , " cloud" );
65
65
viewer->addCoordinateSystem (0 .2f , " global" );
66
66
viewer->initCameraParameters ();
67
67
viewer->registerKeyboardCallback (&OpenNIOrganizedEdgeDetection::keyboard_callback,
@@ -71,43 +71,63 @@ class OpenNIOrganizedEdgeDetection {
71
71
const int point_size = 2 ;
72
72
viewer->addPointCloud <PointT>(cloud, " nan boundary edges" );
73
73
viewer->setPointCloudRenderingProperties (
74
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
74
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE,
75
75
point_size,
76
76
" nan boundary edges" );
77
- viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR,
78
- 0 .0f ,
79
- 0 .0f ,
80
- 1 .0f ,
81
- " nan boundary edges" );
77
+ viewer->setPointCloudRenderingProperties (
78
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_IMMEDIATE_RENDERING,
79
+ 0 .0f ,
80
+ 0 .0f ,
81
+ 1 .0f ,
82
+ " nan boundary edges" );
82
83
83
84
viewer->addPointCloud <PointT>(cloud, " occluding edges" );
84
85
viewer->setPointCloudRenderingProperties (
85
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, " occluding edges" );
86
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_POINT_SIZE,
87
+ point_size,
88
+ " occluding edges" );
86
89
viewer->setPointCloudRenderingProperties (
87
- pcl::visualization::PCL_VISUALIZER_COLOR, 0 .0f , 1 .0f , 0 .0f , " occluding edges" );
90
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_COLOR,
91
+ 0 .0f ,
92
+ 1 .0f ,
93
+ 0 .0f ,
94
+ " occluding edges" );
88
95
89
96
viewer->addPointCloud <PointT>(cloud, " occluded edges" );
90
97
viewer->setPointCloudRenderingProperties (
91
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, " occluded edges" );
98
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_POINT_SIZE,
99
+ point_size,
100
+ " occluded edges" );
92
101
viewer->setPointCloudRenderingProperties (
93
- pcl::visualization::PCL_VISUALIZER_COLOR, 1 .0f , 0 .0f , 0 .0f , " occluded edges" );
102
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_COLOR,
103
+ 1 .0f ,
104
+ 0 .0f ,
105
+ 0 .0f ,
106
+ " occluded edges" );
94
107
95
108
viewer->addPointCloud <PointT>(cloud, " high curvature edges" );
96
109
viewer->setPointCloudRenderingProperties (
97
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
110
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE,
98
111
point_size,
99
112
" high curvature edges" );
100
- viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR,
101
- 1 .0f ,
102
- 1 .0f ,
103
- 0 .0f ,
104
- " high curvature edges" );
113
+ viewer->setPointCloudRenderingProperties (
114
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_COLOR,
115
+ 1 .0f ,
116
+ 1 .0f ,
117
+ 0 .0f ,
118
+ " high curvature edges" );
105
119
106
120
viewer->addPointCloud <PointT>(cloud, " rgb edges" );
107
121
viewer->setPointCloudRenderingProperties (
108
- pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, " rgb edges" );
122
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_POINT_SIZE,
123
+ point_size,
124
+ " rgb edges" );
109
125
viewer->setPointCloudRenderingProperties (
110
- pcl::visualization::PCL_VISUALIZER_COLOR, 0 .0f , 1 .0f , 1 .0f , " rgb edges" );
126
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_COLOR,
127
+ 0 .0f ,
128
+ 1 .0f ,
129
+ 1 .0f ,
130
+ " rgb edges" );
111
131
112
132
return viewer;
113
133
}
@@ -120,43 +140,53 @@ class OpenNIOrganizedEdgeDetection {
120
140
switch (event.getKeyCode ()) {
121
141
case ' 1' :
122
142
viewer->getPointCloudRenderingProperties (
123
- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " nan boundary edges" );
143
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
144
+ opacity,
145
+ " nan boundary edges" );
124
146
viewer->setPointCloudRenderingProperties (
125
- pcl::visualization::PCL_VISUALIZER_OPACITY,
147
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
126
148
1.0 - opacity,
127
149
" nan boundary edges" );
128
150
break ;
129
151
case ' 2' :
130
152
viewer->getPointCloudRenderingProperties (
131
- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " occluding edges" );
153
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
154
+ opacity,
155
+ " occluding edges" );
132
156
viewer->setPointCloudRenderingProperties (
133
- pcl::visualization::PCL_VISUALIZER_OPACITY,
157
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
134
158
1.0 - opacity,
135
159
" occluding edges" );
136
160
break ;
137
161
case ' 3' :
138
162
viewer->getPointCloudRenderingProperties (
139
- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " occluded edges" );
163
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
164
+ opacity,
165
+ " occluded edges" );
140
166
viewer->setPointCloudRenderingProperties (
141
- pcl::visualization::PCL_VISUALIZER_OPACITY,
167
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
142
168
1.0 - opacity,
143
169
" occluded edges" );
144
170
break ;
145
171
case ' 4' :
146
172
viewer->getPointCloudRenderingProperties (
147
- pcl::visualization::PCL_VISUALIZER_OPACITY,
173
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
148
174
opacity,
149
175
" high curvature edges" );
150
176
viewer->setPointCloudRenderingProperties (
151
- pcl::visualization::PCL_VISUALIZER_OPACITY,
177
+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
152
178
1.0 - opacity,
153
179
" high curvature edges" );
154
180
break ;
155
181
case ' 5' :
156
182
viewer->getPointCloudRenderingProperties (
157
- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " rgb edges" );
183
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
184
+ opacity,
185
+ " rgb edges" );
158
186
viewer->setPointCloudRenderingProperties (
159
- pcl::visualization::PCL_VISUALIZER_OPACITY, 1.0 - opacity, " rgb edges" );
187
+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
188
+ 1.0 - opacity,
189
+ " rgb edges" );
160
190
break ;
161
191
}
162
192
}
0 commit comments