半邊數(shù)據(jù)結(jié)構(gòu):
網(wǎng)格的頂點,邊,面的數(shù)據(jù)儲存在半邊數(shù)據(jù)結(jié)構(gòu)中,半邊數(shù)據(jù)結(jié)構(gòu)寫成類似于C語言如下:
半邊:
struct HE_edge
{
HE_vert* vert; // vertex at the end of the half-edge
HE_edge* pair; // oppositely oriented adjacent half-edge
HE_face* face; // face the half-edge borders
HE_edge* next; // next half-edge around the face
};
頂點
struct HE_vert
{
float x;
float y;
float z;
HE_edge* edge; // one of the half-edges emantating from the vertex
};
面:
struct HE_face
{
HE_edge* edge; // one of the half-edges bordering the face
};
浙公網(wǎng)安備 33010602011771號