ZapFace() public method

Destroys a face and removes it from the global face list. All edges of fZap will have a NULL pointer as their left face. Any edges which also have a NULL pointer as their right face are deleted entirely (along with any isolated vertices this produces). An entire mesh can be deleted by zapping its faces, one at a time, in any order. Zapped faces cannot be used in further mesh operations!
public ZapFace ( LibTessDotNet.MeshUtils.Face fZap ) : void
fZap LibTessDotNet.MeshUtils.Face
return void
Exemplo n.º 1
0
 private void DiscardExterior()
 {
     MeshUtils.Face next;
     for (MeshUtils.Face face = _mesh._fHead._next; face != _mesh._fHead; face = next)
     {
         next = face._next;
         if (!face._inside)
         {
             _mesh.ZapFace(face);
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// DiscardExterior zaps (ie. sets to null) all faces
        /// which are not marked "inside" the polygon.  Since further mesh operations
        /// on NULL faces are not allowed, the main purpose is to clean up the
        /// mesh so that exterior loops are not represented in the data structure.
        /// </summary>
        private void DiscardExterior()
        {
            MeshUtils.Face f, next;

            for (f = _mesh._fHead._next; f != _mesh._fHead; f = next)
            {
                // Since f will be destroyed, save its next pointer.
                next = f._next;
                if (!f._inside)
                {
                    _mesh.ZapFace(_pool, f);
                }
            }
        }