Exemplo n.º 1
0
        public static List <MpHalfEdge_v1002> HalfEdgeListToMp(List <HalfEdge> list)
        {
            List <MpHalfEdge_v1002> ret = new List <MpHalfEdge_v1002>();

            for (int i = 0; i < list.Count; i++)
            {
                ret.Add(MpHalfEdge_v1002.Create(list[i]));
            }

            return(ret);
        }
Exemplo n.º 2
0
        public static MpHalfEdge_v1002 Create(HalfEdge he)
        {
            MpHalfEdge_v1002 ret = new MpHalfEdge_v1002();

            ret.ID     = he.ID;
            ret.PairID = he.Pair != null ? he.Pair.ID : 0;
            ret.NextID = he.Next != null ? he.Next.ID : 0;
            ret.PrevID = he.Prev != null ? he.Prev.ID : 0;

            ret.Vertex = he.Vertex;
            ret.Face   = he.Face;
            ret.Normal = he.Normal;

            return(ret);
        }