gpt4 book ai didi

c++ - 如何获取pcl :PolygonMesh object的指针

转载 作者:行者123 更新时间:2023-11-30 02:31:05 24 4
gpt4 key购买 nike

我是 C++ 和 PCL 的新手。我尝试使用需要 pcl::PolygonMesh::PtrmeshDecim.setInputMesh()。我有 pcl::PolygonMesh

pcl::PolygonMesh triangles; 
pcl::PolygonMesh::Ptr meshOutput(new pcl::PolygonMesh());
pcl::PolygonMesh::Ptr inp_ptr;
inp_ptr = triangles; /////????
pcl::MeshQuadricDecimationVTK meshDecim;
meshDecim.setInputMesh(inp_ptr); ///// from triangles
meshDecim.setTargetReductionFactor(0.5);
meshDecim.process(*meshOutput);

最佳答案

要接收某物的内存地址,您可以使用 & 运算符。示例:

pcl::PolygonMesh::Ptr inptr = &triangles;

或者您可以在 meshDecim.SetInputMesh(&triangles); 中传递 &triangles

关于c++ - 如何获取pcl :PolygonMesh object的指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38014221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com