/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 58 | |
| 59 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 60 | void |
| 61 | pcl::MeshProcessing::process (pcl::PolygonMesh &output) |
| 62 | { |
| 63 | // Copy the header |
| 64 | output.header = input_mesh_->header; |
| 65 | |
| 66 | if (!initCompute ()) |
| 67 | { |
| 68 | output.cloud.width = output.cloud.height = 0; |
| 69 | output.cloud.data.clear (); |
| 70 | output.polygons.clear (); |
| 71 | return; |
| 72 | } |
| 73 | |
| 74 | // Set up the output dataset |
| 75 | output.cloud = input_mesh_->cloud; |
| 76 | // \TODO: Double check if this is needed |
| 77 | { |
| 78 | output.polygons.clear (); |
| 79 | output.polygons.reserve (2*input_mesh_->polygons.size ()); /// NOTE: usually the number of triangles is around twice the number of vertices |
| 80 | } |
| 81 | // Perform the actual surface reconstruction |
| 82 | performProcessing (output); |
| 83 | |
| 84 | deinitCompute (); |
| 85 | } |
| 86 |