我正在尝试使用 VCG 库从网格对象中提取顶点的 3d 坐标。有谁知道如何做到这一点?我已经尝试了整个晚上,但一无所获。大写字母似乎代表顶点的某些属性,但我找不到表。谁能帮我吗?谢谢!
问问题
590 次
1 回答
2
对于您的目的,答案可能为时已晚。但也许答案可以帮助其他人。
您可以通过以下方式访问顶点:
MyMesh m;
m.clear();
// cloud->points[i] is how I store the points in a PCL point cloud format
for(int i=0; i<m.VN(); i++)
{
cloud->points[i].x = m.vert[i].P()[0];
// so m.vert[i].P()[0] is how to access the x coordinate of the i-th vertex.
cloud->points[i].y = m.vert[i].P()[1];
cloud->points[i].z = m.vert[i].P()[2];
}
于 2013-09-03T10:31:09.517 回答