可以使用CGAL中的Color类来设置点的颜色。以下是示例代码:

#include <CGAL/Color.h>

// Set the RGB values of the point to red
CGAL::Color red(255, 0, 0);
for (int j = 0; j < planes[i].size(); j++)
{
    planes[i][j].set_color(red);
    pts_pipeishiyan[i].insert(planes[i][j]);
}

在上面的代码中,我们首先创建了一个CGAL::Color对象,它代表红色。然后,我们将这个颜色对象设置为每个点的颜色。最后,我们将这些点插入到点集中。

stdvectorPoint_set pts_pipeishiyan;		pts_pipeishiyanresizeplanessize;stdvectorstdvectorPoint planes;		for int i = 0; i planessize; i++											for int j = 0; j planesisize; j++							 Set the RGB

原文地址: https://www.cveoy.top/t/topic/cu2O 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录