@@ -61,7 +61,7 @@ class OpenNIOrganizedEdgeDetection {
6161 viewer->setSize (640 , 480 );
6262 viewer->addPointCloud <PointT>(cloud, " cloud" );
6363 viewer->setPointCloudRenderingProperties (
64- pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1 , " cloud" );
64+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE, 1 , " cloud" );
6565 viewer->addCoordinateSystem (0 .2f , " global" );
6666 viewer->initCameraParameters ();
6767 viewer->registerKeyboardCallback (&OpenNIOrganizedEdgeDetection::keyboard_callback,
@@ -71,43 +71,63 @@ class OpenNIOrganizedEdgeDetection {
7171 const int point_size = 2 ;
7272 viewer->addPointCloud <PointT>(cloud, " nan boundary edges" );
7373 viewer->setPointCloudRenderingProperties (
74- pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
74+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE,
7575 point_size,
7676 " 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" );
8283
8384 viewer->addPointCloud <PointT>(cloud, " occluding edges" );
8485 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" );
8689 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" );
8895
8996 viewer->addPointCloud <PointT>(cloud, " occluded edges" );
9097 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" );
92101 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" );
94107
95108 viewer->addPointCloud <PointT>(cloud, " high curvature edges" );
96109 viewer->setPointCloudRenderingProperties (
97- pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
110+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_POINT_SIZE,
98111 point_size,
99112 " 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" );
105119
106120 viewer->addPointCloud <PointT>(cloud, " rgb edges" );
107121 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" );
109125 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" );
111131
112132 return viewer;
113133 }
@@ -120,43 +140,53 @@ class OpenNIOrganizedEdgeDetection {
120140 switch (event.getKeyCode ()) {
121141 case ' 1' :
122142 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" );
124146 viewer->setPointCloudRenderingProperties (
125- pcl::visualization::PCL_VISUALIZER_OPACITY,
147+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
126148 1.0 - opacity,
127149 " nan boundary edges" );
128150 break ;
129151 case ' 2' :
130152 viewer->getPointCloudRenderingProperties (
131- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " occluding edges" );
153+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
154+ opacity,
155+ " occluding edges" );
132156 viewer->setPointCloudRenderingProperties (
133- pcl::visualization::PCL_VISUALIZER_OPACITY,
157+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
134158 1.0 - opacity,
135159 " occluding edges" );
136160 break ;
137161 case ' 3' :
138162 viewer->getPointCloudRenderingProperties (
139- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " occluded edges" );
163+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
164+ opacity,
165+ " occluded edges" );
140166 viewer->setPointCloudRenderingProperties (
141- pcl::visualization::PCL_VISUALIZER_OPACITY,
167+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
142168 1.0 - opacity,
143169 " occluded edges" );
144170 break ;
145171 case ' 4' :
146172 viewer->getPointCloudRenderingProperties (
147- pcl::visualization::PCL_VISUALIZER_OPACITY,
173+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
148174 opacity,
149175 " high curvature edges" );
150176 viewer->setPointCloudRenderingProperties (
151- pcl::visualization::PCL_VISUALIZER_OPACITY,
177+ pcl::visualization::RenderingProperties:: PCL_VISUALIZER_OPACITY,
152178 1.0 - opacity,
153179 " high curvature edges" );
154180 break ;
155181 case ' 5' :
156182 viewer->getPointCloudRenderingProperties (
157- pcl::visualization::PCL_VISUALIZER_OPACITY, opacity, " rgb edges" );
183+ pcl::visualization::RenderingProperties::PCL_VISUALIZER_OPACITY,
184+ opacity,
185+ " rgb edges" );
158186 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" );
160190 break ;
161191 }
162192 }
0 commit comments