Exemple #1
0
        public csgjs_polygon clone()
        {
            csgjs_polygon c = new csgjs_polygon();

            foreach (csgjs_vertex v in vertices)
            {
                c.vertices.Add(v.clone());
            }
            c.plane = plane.clone();
            return(c);
        }
        public csgjs_csgnode clone()
        {
            csgjs_csgnode ret = new csgjs_csgnode();

            foreach (csgjs_polygon p in polygons)
            {
                ret.polygons.Add(p.clone());
            }
            ret.plane = plane.clone();

            if (front != null)
            {
                ret.front = front.clone();
            }

            if (back != null)
            {
                ret.back = back.clone();
            }

            return(ret);
        }