数字几何处理(3)

半边数据结构:

  网格的顶点,边,面的数据储存在半边数据结构中,半边数据结构写成类似于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

    };

原文链接

  

猜你喜欢

转载自www.cnblogs.com/picturesqueillusion/p/11600126.html