Exemplo n.º 1
0
        public void DeleteFace(HEFace face)
        {
            if (face == null || face.IsDeleted)
            {
                return;
            }

            var hedges  = face.GetHalfEdges();
            var vertice = face.GetVertice();

            foreach (var hedge in hedges)
            {
                hedge.RelativeFace = null;
                if (hedge.RelativeEdge.IsIsolated)
                {
                    DeleteEdge(hedge.RelativeEdge);
                }
            }

            foreach (var vertex in vertice)
            {
                vertex.AdjustOutGoingToBoundary();
            }

            _DeleteFace(face);
        }
Exemplo n.º 2
0
        private HEFace _NewFace()
        {
            var ret = new HEFace();

            ret.ID = FaceCount;
            _faces.Add(ret);
            return(ret);
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     _id           = HEMesh.InvaildID;
     _vertexTo     = null;
     _relativeFace = null;
     _relativeEdge = null;
     _nextEdge     = null;
     _preEdge      = null;
     _oppEdge      = null;
 }
Exemplo n.º 4
0
 internal HEEdge(int id, HEVertex goingTo, HEFace relativeFace, HEdge relativeEdge, HEEdge nextEdge, HEEdge preEdge, HEEdge oppEdge)
 {
     _id           = id;
     _vertexTo     = goingTo;
     _relativeFace = relativeFace;
     _relativeEdge = relativeEdge;
     _nextEdge     = nextEdge;
     _preEdge      = preEdge;
     _oppEdge      = oppEdge;
 }
Exemplo n.º 5
0
 private void _DeleteFace(HEFace face)
 {
     _DeleteElement(face, _faces);
 }
Exemplo n.º 6
0
 public Vector3D GetFaceNormal(HEFace face)
 {
     return(GetFaceNormal(face.ID));
 }