Example #1
0
        public static List <MpHalfEdge_v1001> HalfEdgeListToMp(List <HalfEdge> list)
        {
            List <MpHalfEdge_v1001> ret = new List <MpHalfEdge_v1001>();

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

            return(ret);
        }
Example #2
0
        public static MpHalfEdge_v1001 Create(HalfEdge he)
        {
            MpHalfEdge_v1001 ret = new MpHalfEdge_v1001();

            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);
        }