39 #ifndef PCL_POINT_CLOUD_GEOMETRY_HANDLERS_IMPL_HPP_
40 #define PCL_POINT_CLOUD_GEOMETRY_HANDLERS_IMPL_HPP_
45 template <
typename Po
intT>
62 template <
typename Po
intT>
void
70 points->SetDataTypeToFloat ();
73 data->SetNumberOfComponents (3);
74 vtkIdType nr_points = cloud_->points.size ();
78 float* pts = static_cast<float*> (malloc (nr_points * 3 *
sizeof (
float)));
83 for (vtkIdType i = 0; i < nr_points; ++i)
85 pts[i * 3 + 0] = cloud_->points[i].x;
86 pts[i * 3 + 1] = cloud_->points[i].y;
87 pts[i * 3 + 2] = cloud_->points[i].z;
89 data->SetArray (&pts[0], nr_points * 3, 0);
90 points->SetData (data);
95 for (vtkIdType i = 0; i < nr_points; ++i)
98 if (!std::isfinite (cloud_->points[i].x) || !std::isfinite (cloud_->points[i].y) || !std::isfinite (cloud_->points[i].z))
101 pts[j * 3 + 0] = cloud_->points[i].x;
102 pts[j * 3 + 1] = cloud_->points[i].y;
103 pts[j * 3 + 2] = cloud_->points[i].z;
107 data->SetArray (&pts[0], j * 3, 0);
108 points->SetData (data);
113 template <
typename Po
intT>
130 template <
typename Po
intT>
void
138 points->SetDataTypeToFloat ();
139 points->SetNumberOfPoints (cloud_->points.size ());
143 for (vtkIdType i = 0; i < static_cast<vtkIdType> (cloud_->points.size ()); ++i)
145 p[0] = cloud_->points[i].normal[0];
146 p[1] = cloud_->points[i].normal[1];
147 p[2] = cloud_->points[i].normal[2];
149 points->SetPoint (i, p);
153 #define PCL_INSTANTIATE_PointCloudGeometryHandlerXYZ(T) template class PCL_EXPORTS pcl::visualization::PointCloudGeometryHandlerXYZ<T>;
154 #define PCL_INSTANTIATE_PointCloudGeometryHandlerSurfaceNormal(T) template class PCL_EXPORTS pcl::visualization::PointCloudGeometryHandlerSurfaceNormal<T>;
156 #endif // PCL_POINT_CLOUD_GEOMETRY_HANDLERS_IMPL_HPP_