0
我試圖使用Triangle library鑲嵌帶孔的多邊形。鑲嵌三角形將由OpenGL渲染。 我的多邊形有一個外部環和多個內部環。我所擁有的是所有環的x,y座標。爲了與三角LIB棋盤格狀,我要通過孔列表和空穴三角的數目lib添加到其triangulateio結構構件:holelist
和numberofholes
指定三角形庫中的孔
struct triangulateio {
REAL *pointlist; /* In/out */
REAL *pointattributelist; /* In/out */
int *pointmarkerlist; /* In/out */
int numberofpoints; /* In/out */
int numberofpointattributes; /* In/out */
int *trianglelist; /* In/out */
REAL *triangleattributelist; /* In/out */
REAL *trianglearealist; /* In only */
int *neighborlist; /* Out only */
int numberoftriangles; /* In/out */
int numberofcorners; /* In/out */
int numberoftriangleattributes; /* In/out */
int *segmentlist; /* In/out */
int *segmentmarkerlist; /* In/out */
int numberofsegments; /* In/out */
REAL *holelist; /* In/pointer to array copied out */
int numberofholes; /* In/copied out */
REAL *regionlist; /* In/pointer to array copied out */
int numberofregions; /* In/copied out */
int *edgelist; /* Out only */
int *edgemarkerlist; /* Not used with Voronoi diagram; out only */
REAL *normlist; /* Used only with Voronoi diagram; out only */
int numberofedges; /* Out only */
};
這些孔由內孔的一個點的座標表示。我的問題是:我可以在沒有指定孔的情況下進行曲面細分(只使用內部環)?或者如果我必須列出這些洞,我如何能夠快速找到洞內的一個點?這個過程對時間至關重要。